Message 1 of 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello.
This will find & replace but I'd also like to alter the next column cell value if a criteria is met:
how can oCell.Value be edited?
If Column Description = "M4 FORM A WASHER"
then
Material Column = " BS EN ISO 7089:2000"
Dim oPartslist As PartsList oPartslist = oSheet.PartsLists(1) Dim ic As Integer For ic = 1 To oSheet.PartsLists.Count oPartsList = oSheet.PartsLists.Item(ic) Next Dim i As Long For i = 1 To oPartsList.PartsListRows.Count Dim oRow As PartsListRow oRow = oPartsList.PartsListRows.Item(i) ' Iterate through each column in the row. Dim j As Long For j = 1 To oPartsList.PartsListColumns.Count ' Get the current cell. Dim oCell As PartsListCell oCell = oRow.Item(j) ' ' Check that the column isn't the quantity column. ' If oPartslist.PartsListColumns.Item(j).Title = sColumnTitle Then ' xx = oRow ' yy = j ' MessageBox.Show(xx, yy) If oCell.Value = "M4 FORM A WASHER" Then oCell.Value = "M4 FORM A WASHER C.S BZP" oCell.Static = True End If ' End If Next Next
Regards
Andrew
Solved! Go to Solution.