Add range after selected cell

N

Natasha

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
 
B

Bob Phillips

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)
 
N

Natasha

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top