Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Cut certain cells paste to side and shift cells up

Posted on 2011-02-14
5
Medium Priority
?
252 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:mmcompact
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:LelikInside
ID: 34891310
A little hint: Rows(Activecell.row).select
0
 

Author Comment

by:mmcompact
ID: 34891391
could you be more specific? thanks
0
 
LVL 11

Accepted Solution

by:
thydzik earned 2000 total points
ID: 34905716
see the attached. select the temp1.xls and it will populate the 2 columns

 compile-to-2-columns.xls
0
 

Author Comment

by:mmcompact
ID: 34910215
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
0
 
LVL 11

Expert Comment

by:thydzik
ID: 34913371
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.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question