I would be very thankful for some help. I have a spreadsheet from a text download so data appears in different columns in different rows. For example, my "inclusions" may appear in R3, Q4, P2, etc., followed by the specific inclusions in S3, R4, Q2 and so on. I am trying to line up the cells that say "inclusions" in column S and have the specific inclusions follow accordingly in lined up columns. Here is my code that I tried but am having problems with:
' to move the inclusion column over
Columns("R:R").Select
Do While Selection.find(What:="inclusions", After:=ActiveCell, LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _MatchCase:=False, SearchFormat:=False) = True
ActiveCell.Activate
ActiveCell.Insert Shift:=xlToRight
Loop
My next lines of code would be for column Q and I would shift it 2 cells to the right and so on so that "inclusions" will be in column S. Today I got a syntax error. I'm sure it's an easy fix, but I'm just learning VBA so any advice will help. Thanks!
' to move the inclusion column over
Columns("R:R").Select
Do While Selection.find(What:="inclusions", After:=ActiveCell, LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _MatchCase:=False, SearchFormat:=False) = True
ActiveCell.Activate
ActiveCell.Insert Shift:=xlToRight
Loop
My next lines of code would be for column Q and I would shift it 2 cells to the right and so on so that "inclusions" will be in column S. Today I got a syntax error. I'm sure it's an easy fix, but I'm just learning VBA so any advice will help. Thanks!