Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add range after selected cell
I would like the user to select the cell where the range is to be added and
then click the buton that runs the macro to add the range. At the moment the Macro looks like this: Sub AddLanguage() ' ' AddLanguage Macro ' Macro recorded 05/09/2008 by NATASHA ' ' Keyboard Shortcut: Ctrl+m ' Sheets("BackgroundData").Select Rows("40:44").Select Selection.Copy Sheets("Active projects").Select ActiveWindow.SmallScroll Down:=-495 Rows("4:4").Select Range("G4").Activate Selection.Insert Shift:=xlDown End Sub -- Natasha |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add range after selected cell
Isn't it just
Sub AddLanguage() Selection.Copy Sheets("Active projects").Select Rows("4:4").Insert Shift:=xlDown End Sub -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Natasha" wrote in message ... I would like the user to select the cell where the range is to be added and then click the buton that runs the macro to add the range. At the moment the Macro looks like this: Sub AddLanguage() ' ' AddLanguage Macro ' Macro recorded 05/09/2008 by NATASHA ' ' Keyboard Shortcut: Ctrl+m ' Sheets("BackgroundData").Select Rows("40:44").Select Selection.Copy Sheets("Active projects").Select ActiveWindow.SmallScroll Down:=-495 Rows("4:4").Select Range("G4").Activate Selection.Insert Shift:=xlDown End Sub -- Natasha |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add range after selected cell
Thanks for the reply. It didn't work for me. Assume I have no prior
knowledge in this. Let me clarify. The Active project sheet is where the user tracks the projects (In this case it is translation projects for a marketing company). Not all work is translated into all languages. So I want the user to be able to "add a language" under any project listed on the Active template. The template required for each language is allocated on the 'BackgroundData' sheet - (row 40 to 44) - lets call this range LanguageTemplate. the macro I manually recorded below ads the LanguageTemplate to the correct sheet (Active projects) but it always adds it to start at row 4 (Which is the first data row under the header - as I recorded it manually). Instead what I want is for the LanguageTemplate to be added on the row that the user specified. Ie row 34 or row 2238 or where-ever it is needed to add a language. Simplified version to get the idea: Prj Name Translation Language BSC973 French Polish German VIR8634 Italia German Japanese SID2834 Spanish Russian -- Natasha "Bob Phillips" wrote: Isn't it just Sub AddLanguage() Selection.Copy Sheets("Active projects").Select Rows("4:4").Insert Shift:=xlDown End Sub -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Natasha" wrote in message ... I would like the user to select the cell where the range is to be added and then click the buton that runs the macro to add the range. At the moment the Macro looks like this: Sub AddLanguage() ' ' AddLanguage Macro ' Macro recorded 05/09/2008 by NATASHA ' ' Keyboard Shortcut: Ctrl+m ' Sheets("BackgroundData").Select Rows("40:44").Select Selection.Copy Sheets("Active projects").Select ActiveWindow.SmallScroll Down:=-495 Rows("4:4").Select Range("G4").Activate Selection.Insert Shift:=xlDown End Sub -- Natasha |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Insert selected cell value into next cell in range that is empty | Excel Worksheet Functions | |||
Looking at each cell when range is selected | Excel Programming | |||
adjustine the range of a selected cell | Excel Programming | |||
Find the last cell in a selected range? | Excel Programming | |||
Does the selected cell have a range name? | Excel Programming |