View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
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