Basically I have a code that changes (column d, BOC) into general ledger numbers converting all 3100-3140 into 3100-3157 however ONLY one Branch (column c, named branches) named "GLD" doesn't need to have its BOC changed it needs to stay 3100-3157 or convert back to 3100-3157. However it isn't always on the same row and there maybe several rows with this data.
This is the code I'm using to convert over 1000 rows with 15 different branches into 3100-3140:
Columns("D:D").Select
Selection.Replace What:="3100-3157", Replacement:="3100/3140 - Equipment w/ Maintenance", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
Is there a way to either tell my code not to convert GLD (Column c, named branches) if it has 3100/3157 in (Column C, boc), or is it easier to then convert the new information of 3100-3140 back to 3100-3157 (Column C)if the Branch = GLD (Column D)?
Thank you for your help. I know I can do several if statements formulas but not sure what to do when it comes to VBA
This is the code I'm using to convert over 1000 rows with 15 different branches into 3100-3140:
Columns("D:D").Select
Selection.Replace What:="3100-3157", Replacement:="3100/3140 - Equipment w/ Maintenance", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
Is there a way to either tell my code not to convert GLD (Column c, named branches) if it has 3100/3157 in (Column C, boc), or is it easier to then convert the new information of 3100-3140 back to 3100-3157 (Column C)if the Branch = GLD (Column D)?
Thank you for your help. I know I can do several if statements formulas but not sure what to do when it comes to VBA