Link to home
Start Free TrialLog in
Avatar of mmcompact
mmcompactFlag for United States of America

asked on

Cut certain cells paste to side and shift cells up

I have file1 needs to be formatted to file2 every day. Basically, all the rows contain "1.1 - Item(s)..." in column D need to be moved to the right part of the sheet and shift up the empty cells up after that. When I record macro and use "Shift+Ctrl" to select cells, it only records the row number it should go to on this sheet while the number of these rows will changes everyday.
How can I make changes on the VBA code to accomplish this task?
temp1.xls
temp2.xls
Avatar of LelikInside
LelikInside
Flag of Russian Federation image

A little hint: Rows(Activecell.row).select
Avatar of mmcompact

ASKER

could you be more specific? thanks
ASKER CERTIFIED SOLUTION
Avatar of Travis Hydzik
Travis Hydzik
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thydzik:

When I check it again, it didn't worked quite as I wanted. First I don't want the script to run when I open it. Secondly, after I put the second column back to the first column and try to run "runme" manually, it didn't cut and paste the rows back
compile-to-2-columns-revised.xls
mmcompact,

You did not specify how you wanted the script to run.

Secondly, you did not specify it needed to run in reverse writing from 2 columns to 1.

Please create a new question specifying these new requests.