|October 5th, 2003, 04:55||#1|
Knowledge is the solution
Join Date: Dec 2002
Location: Pittsburgh, US. Previously in Mexico City
question with macros
I dont have experience with macros so i would like to know if someone can give me a hint for this thing I want to do in excel
When passing a pseudo-world table to excel (pseudo because its not really a table, its just arranged in the form of a table) some of the colums get defasated, meaning that they move some cells to the right, but the rows stay ok. For example, some of the data from column a ended up in column b, however they wouldnt overlap if i merged the columns.
My question is, how can i make a macro that merges the columns, or more generally, that moves cells
|October 6th, 2003, 03:28||#2|
Join Date: Jun 2001
Location: Chanhassen, MN
Re: question with macros
use the macro record/playback
tools->record new macro
not sure what your looking to do?
I uploaded an example you have to have the cursor on the top "hello" cell because its recorded as relative. Just click the go button and it will move the cells
now look like this
1 hello move
2 hello move
3 hello move
this is pretty easy to do.
1. record a new macro.
2. select relative.
3. select the cell with "hello" in it
4. hit the down arrow to move to the cell labeled "move"
5. ctl+c to copy
6. arrow up, arrow right
7. ctl+x to cut paste
8. select the empty row, right click and delete
9. move the cursor to the next "hello"
10. stop record
then you can add a button if you want or change it to loop in the vb editor.