Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Getting multiple cell contents using a macro


Hi, I'm trying to build/refresh a summary sheet using a macro that pull
key data from other sheets.
I have started with listing the names of the other sheets with the d
loop below and this works ok. The command lines commented out is wher
I am having trouble. I would like to populate rows in the summary shee
with some data from the other sheets. I tried to use 'evaluate' , bu
not sure how to call the sheet using sheet numbers, I also tried a tem
variable for the sheet name, but could not get that to work either. Ca
anyone help with the correct way to do this?

For i = 1 To Sheets.Count - 1
Cells(1 + i, 2).Value = Sheets(i + 1).Name
' Cells(1 + i, 8).Value = Evaluate(Sheets(i + 1).Name!h6)
' tempb = Sheets(i + 1).Name
' Cells(1 + i, 8).Value = Evaluate(tempb!h6)
Next i


Thanks
Nei

--
neilgran
Posted from - http://www.officehelp.i

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Getting multiple cell contents using a macro

Maybe this one Neil

http://www.rondebruin.nl/copy2.htm

Or with formula links
http://www.rondebruin.nl/summary.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"neilgrant" wrote in message ...

Hi, I'm trying to build/refresh a summary sheet using a macro that pulls
key data from other sheets.
I have started with listing the names of the other sheets with the do
loop below and this works ok. The command lines commented out is where
I am having trouble. I would like to populate rows in the summary sheet
with some data from the other sheets. I tried to use 'evaluate' , but
not sure how to call the sheet using sheet numbers, I also tried a temp
variable for the sheet name, but could not get that to work either. Can
anyone help with the correct way to do this?

For i = 1 To Sheets.Count - 1
Cells(1 + i, 2).Value = Sheets(i + 1).Name
' Cells(1 + i, 8).Value = Evaluate(Sheets(i + 1).Name!h6)
' tempb = Sheets(i + 1).Name
' Cells(1 + i, 8).Value = Evaluate(tempb!h6)
Next i


Thanks
Neil


--
neilgrant
Posted from - http://www.officehelp.in



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Getting multiple cell contents using a macro


Thanks Ron !!
I tried the second solution you suggested and it works great.
I would also like to make the sheet names on the summary sheet int
hyperlinks to jump to the detail sheet, would you have an example o
the code that I can add to do this?

thanks
Nei

--
neilgran
Posted from - http://www.officehelp.i

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Getting multiple cell contents using a macro

Why not add one forms button on the sheet and assign this macro

Sub test()
On Error Resume Next
Sheets(Cells(ActiveCell.Row, "A").Value).Select
On Error GoTo 0
End Sub

It will go to the sheet name in column A of the activecell row


--
Regards Ron de Bruin
http://www.rondebruin.nl


"neilgrant" wrote in message ...

Thanks Ron !!
I tried the second solution you suggested and it works great.
I would also like to make the sheet names on the summary sheet into
hyperlinks to jump to the detail sheet, would you have an example of
the code that I can add to do this?

thanks
Neil


--
neilgrant
Posted from - http://www.officehelp.in



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
How to separate contents of one cell into multiple horizontal cell Going Crazy with excel Excel Discussion (Misc queries) 1 May 21st 10 02:28 AM
separate contents of one cell into multiple cells Horacio[_4_] Excel Worksheet Functions 4 January 24th 10 12:25 AM
How do I combine the contents of multiple cells in one cell? Debbie Excel Worksheet Functions 3 December 16th 05 10:57 PM
Macro to remove contents of cell and move all other contents up one row adw223 Excel Discussion (Misc queries) 1 July 1st 05 03:57 PM
Splitting multiple cell contents containing values at end Syns Excel Worksheet Functions 2 May 24th 05 04:24 PM


All times are GMT +1. The time now is 09:07 PM.

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"