Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert selected cell value into next cell in range that is empty Guy[_2_] Excel Worksheet Functions 6 January 3rd 09 10:08 PM
Looking at each cell when range is selected James Excel Programming 1 August 19th 08 07:13 PM
adjustine the range of a selected cell abumustapha Excel Programming 3 May 19th 08 07:53 PM
Find the last cell in a selected range? J@Y Excel Programming 6 June 15th 07 07:25 PM
Does the selected cell have a range name? Bill[_41_] Excel Programming 5 March 19th 07 08:02 PM


All times are GMT +1. The time now is 06:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"