Mortadella
Member
1: I import a data sheet that I need to edit before posting it to another worksheet. When I import the data I insert a column which serves as a line counter. The imported data is usually skewed so I need to sort it out and this is where my problems start.
The range I usually have to sort contains data like the following:
Rank Col A Col B Col C Col D Col E Col F Col G---- to Col N
221 950.00 1220.00 22.95 201.25
222
223...
230 9755.00 197.25 258.95 896.22
My range finishes at Cell N800 but because the data changes in length each day I never know where it will start. My macro will get my cursor to the cell I want it to start at
but I can't figure out how to define the range from the cellpointer to N800 Excell always wants a cell address - so if you can help me figure that out that would really help.
2: As you can see from the layout I get a large number of cells full of numbers in Col C that need to be moved over into Col H and I need to put a 1 in column N on the same line so when I am done it looks like this:
Rank Col A Col B Col C Col D Col E Col F Col G ColH --------------- to Col N
221 950.00 1220.00 22.95 201.25 1
230 9755.00 197.25 258.95 896.22 1
I can sort this out quite easily by hand but the macro I have written (using a loop)takes a long time because I have to do the inserts line by line to insert the four columns I need to push my numbers over and add the 1 in Col N. I would love to be able to insert cells from the line this kind of data starts to the end of my file on line 800 but my range naming problem above has me scuppered.
I still have all the blank lines that I need to get rid of which I think the solution to part 1 will help me with.
If anyone can suggest a good reference book to learn basic "macroese" I would be very grateful.
Thanks!
The range I usually have to sort contains data like the following:
Rank Col A Col B Col C Col D Col E Col F Col G---- to Col N
221 950.00 1220.00 22.95 201.25
222
223...
230 9755.00 197.25 258.95 896.22
My range finishes at Cell N800 but because the data changes in length each day I never know where it will start. My macro will get my cursor to the cell I want it to start at
but I can't figure out how to define the range from the cellpointer to N800 Excell always wants a cell address - so if you can help me figure that out that would really help.
2: As you can see from the layout I get a large number of cells full of numbers in Col C that need to be moved over into Col H and I need to put a 1 in column N on the same line so when I am done it looks like this:
Rank Col A Col B Col C Col D Col E Col F Col G ColH --------------- to Col N
221 950.00 1220.00 22.95 201.25 1
230 9755.00 197.25 258.95 896.22 1
I can sort this out quite easily by hand but the macro I have written (using a loop)takes a long time because I have to do the inserts line by line to insert the four columns I need to push my numbers over and add the 1 in Col N. I would love to be able to insert cells from the line this kind of data starts to the end of my file on line 800 but my range naming problem above has me scuppered.
I still have all the blank lines that I need to get rid of which I think the solution to part 1 will help me with.
If anyone can suggest a good reference book to learn basic "macroese" I would be very grateful.
Thanks!