Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there, I've created a macro at the top of a page that inserts two rows and
copys some text from above, to create another 'entry' but ive also done this further down but after ive run the top one it then puts the bottom one out of sync, is there any way of making a macro relative to a certain cell or relative to the button that runs it? or any solution will do... i just need to be able to replicate bits of text to create room for more entries at different stage down the page, help much appreciated¬! thanks Will |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
cells(rows.count,"A").End(xlup).offset(1,0)
will be the next empty cell in column A coming up from the bottom. Adapt to your situation. -- Regards, Tom Ogilvy "bilbo+" wrote: Hi there, I've created a macro at the top of a page that inserts two rows and copys some text from above, to create another 'entry' but ive also done this further down but after ive run the top one it then puts the bottom one out of sync, is there any way of making a macro relative to a certain cell or relative to the button that runs it? or any solution will do... i just need to be able to replicate bits of text to create room for more entries at different stage down the page, help much appreciated¬! thanks Will |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm kind of new to this so if you could just lend a little more of a hand!
basically for example, this is on rows 14 to 18. and i would want to create another entry for this date so there are three instead of two. so what i did was just insert two rows copy and paste (as a macro) then ran it, but as mentioned before that put it all out of sync when i did that to another further down. the macro read like this Rows("16:16").Select Selection.Insert Shift:=xlDown Selection.Insert Shift:=xlDown Range("C13:J13").Select Selection.Copy Destination:=Range("C16:J16") Range("C16:J16").Select Using that code just insert two rows in that column, when i need it the entire row, i could just be being really stupid... so how do i change it to do what I need? sorry i know im asking a lot but any help would be hugely grarteful! Number Of Terminals (n) 0 QW= 8.5 0 Number Of Terminals (n) 0 QW= 8.5 0 "Tom Ogilvy" wrote: cells(rows.count,"A").End(xlup).offset(1,0) will be the next empty cell in column A coming up from the bottom. Adapt to your situation. -- Regards, Tom Ogilvy "bilbo+" wrote: Hi there, I've created a macro at the top of a page that inserts two rows and copys some text from above, to create another 'entry' but ive also done this further down but after ive run the top one it then puts the bottom one out of sync, is there any way of making a macro relative to a certain cell or relative to the button that runs it? or any solution will do... i just need to be able to replicate bits of text to create room for more entries at different stage down the page, help much appreciated¬! thanks Will |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
insert your rows coming up from the bottom.
for example, process row 20, then 15, then 10 this way, your references don't move. -- Regards, Tom Ogilvy "bilbo+" wrote: I'm kind of new to this so if you could just lend a little more of a hand! basically for example, this is on rows 14 to 18. and i would want to create another entry for this date so there are three instead of two. so what i did was just insert two rows copy and paste (as a macro) then ran it, but as mentioned before that put it all out of sync when i did that to another further down. the macro read like this Rows("16:16").Select Selection.Insert Shift:=xlDown Selection.Insert Shift:=xlDown Range("C13:J13").Select Selection.Copy Destination:=Range("C16:J16") Range("C16:J16").Select Using that code just insert two rows in that column, when i need it the entire row, i could just be being really stupid... so how do i change it to do what I need? sorry i know im asking a lot but any help would be hugely grarteful! Number Of Terminals (n) 0 QW= 8.5 0 Number Of Terminals (n) 0 QW= 8.5 0 "Tom Ogilvy" wrote: cells(rows.count,"A").End(xlup).offset(1,0) will be the next empty cell in column A coming up from the bottom. Adapt to your situation. -- Regards, Tom Ogilvy "bilbo+" wrote: Hi there, I've created a macro at the top of a page that inserts two rows and copys some text from above, to create another 'entry' but ive also done this further down but after ive run the top one it then puts the bottom one out of sync, is there any way of making a macro relative to a certain cell or relative to the button that runs it? or any solution will do... i just need to be able to replicate bits of text to create room for more entries at different stage down the page, help much appreciated¬! thanks Will |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copying Cells | Excel Discussion (Misc queries) | |||
Copying Cells | Excel Worksheet Functions | |||
copying cells by checking color of the cells | Excel Programming | |||
How do I skip blank cells when copying over a range of cells? | Excel Discussion (Misc queries) | |||
Excel should allow cloaking of certain cells when copying cells b. | Excel Worksheet Functions |