Hello - I am trying to create a macro which inserts two columns prior to the final two columns 'Total' in my worksheet.
When I recorded the macro, the VBA was obviously written to always insert columns at 'BD' and 'BE':
Sheets("VDN").Select
Columns("BD:BE").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
What I need to know is, how do I correct the VBA to reflect that the two columns to be inserted, always insert before the last two 'Total' columns?
Thanks in advance for the help.
When I recorded the macro, the VBA was obviously written to always insert columns at 'BD' and 'BE':
Sheets("VDN").Select
Columns("BD:BE").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
What I need to know is, how do I correct the VBA to reflect that the two columns to be inserted, always insert before the last two 'Total' columns?
Thanks in advance for the help.
Last edited by a moderator: