dubabear
09-22-2016, 11:26 AM
Currently I'm working on a macro that will find "|" copy the row and paste it. This is where I'm getting stuck as I'm trying to delete the text after |, then go to the copied cell and delete the text prior to |
This is the current VBA code:
Macro1 Macro
Cells.Find(What:="|", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Select
ActiveCell.EntireRow.Select
Selection.Copy
Selection.Insert Shift:=xlDown
Range("N" & (ActiveCell.Row)).Select
Replace "|*", "", x1Part
End Sub
Overall my situation is this, I receive a file that has invoice # and sometimes the invoice cell(column N) has two numbers separated by |, to do further analyze I have copy the row paste it, and assign a row to one of the invoice. Then I need to divide the amount$ (column R) by 2.
Majority 90% of duplicates are only two, sometimes there are 3 numbers or 4 all separated by |.
Thanks for the help.
This is the current VBA code:
Macro1 Macro
Cells.Find(What:="|", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Select
ActiveCell.EntireRow.Select
Selection.Copy
Selection.Insert Shift:=xlDown
Range("N" & (ActiveCell.Row)).Select
Replace "|*", "", x1Part
End Sub
Overall my situation is this, I receive a file that has invoice # and sometimes the invoice cell(column N) has two numbers separated by |, to do further analyze I have copy the row paste it, and assign a row to one of the invoice. Then I need to divide the amount$ (column R) by 2.
Majority 90% of duplicates are only two, sometimes there are 3 numbers or 4 all separated by |.
Thanks for the help.