Name Macro (1 Viewer)

mahen

Registered User.
Local time
Today, 13:04
Joined
Jan 13, 2008
Messages
56
Required a macro to copy Names from Summary tab to Rest of the appropriate tabs in c3 (highlighted in yellow). Physically copied in Name1 tab.

Thanks.
Mahen
 

Attachments

  • Book1.xls
    24 KB · Views: 141
Last edited:

Brianwarnock

Retired
Local time
Today, 13:04
Joined
Jun 2, 2003
Messages
12,701
Interesting request, normally summary sheets get their information from the detail sheets, where does the information in the summary sheet come from?

Brian
 

mahen

Registered User.
Local time
Today, 13:04
Joined
Jan 13, 2008
Messages
56
Thanks Brian for looking into. Information in Summary sheet is copy from another file physically. Only column C information is need to copy into appropriate sheet in C3.
 

Brianwarnock

Retired
Local time
Today, 13:04
Joined
Jun 2, 2003
Messages
12,701
OK , assuming that the table and sheets are in the same order and the first name sheet is sheet 3 as per your example simple code as below should work.

Brian

Code:
Dim r As Long ' row index
Dim n As Long  ' sheet index
r = 3
n = 3
Do
Worksheets(n).Range("a5") = Worksheets("summary").Cells(r, 3)
r = r + 1
n = n + 1
Loop Until Worksheets("summary").Cells(r, 3) = ""
 
Last edited:

mahen

Registered User.
Local time
Today, 13:04
Joined
Jan 13, 2008
Messages
56
Thanks Brian. I am getting " Complier Error: Invalid outside prodecure". Not sure where you get sheet 3 from. Also not sure about why A5. Summary sheet contain a two table. Column B, name of the sheets and column C contain appropriate Names which should copy into the Name1 to Name4 in cell c3. Edit my file and re-send please.

thanks
 
Last edited:

Brianwarnock

Retired
Local time
Today, 13:04
Joined
Jun 2, 2003
Messages
12,701
Ok sheet3 and A5 where leftoversfrom a test, but esily corrected if you know VBA , but i'm guessing you don't given that ou got a compile error.

I've attached the workbook with the sub, to view right click the summary tab and click view code.

Brian
 

Attachments

  • forumbook1.xls
    40 KB · Views: 130

mahen

Registered User.
Local time
Today, 13:04
Joined
Jan 13, 2008
Messages
56
Brian,
Perfect. Working now. I did sub and end. But had that error.
Thanks you.
Mahen
 

Users who are viewing this thread

Top Bottom