Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Pull Cells From Sheets


I need to pull cell N2 from each of the 48 sheets in my workbook an
compile a list of them onto sheet1

--
Optitro
-----------------------------------------------------------------------
Optitron's Profile: http://www.excelforum.com/member.php...fo&userid=2672
View this thread: http://www.excelforum.com/showthread.php?threadid=46763

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Pull Cells From Sheets

Optitron,

Try the macro below.

HTH,
Bernie
MS Excel MVP


Sub Macro1()
Dim i As Integer

With Worksheets("Sheet1")
..Cells(1, 1).Value = "Sheet Name"
..Cells(1, 2).Value = "Value from N2"
For i = 1 To Sheets.Count
..Cells(i + 1, 1).Value = Sheets(i).Name
..Cells(i + 1, 2).Value = Sheets(i).Range("N2").Value
Next i
End With
End Sub

"Optitron" wrote in
message ...

I need to pull cell N2 from each of the 48 sheets in my workbook and
compile a list of them onto sheet1.


--
Optitron
------------------------------------------------------------------------
Optitron's Profile:
http://www.excelforum.com/member.php...o&userid=26729
View this thread: http://www.excelforum.com/showthread...hreadid=467639



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Pull Cells From Sheets


It worked. The lines that you put ..cells were red so I changed it to
..cells and it worked perfect.


--
Optitron
------------------------------------------------------------------------
Optitron's Profile: http://www.excelforum.com/member.php...o&userid=26729
View this thread: http://www.excelforum.com/showthread...hreadid=467639

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Pull Cells From Sheets

Optitron,

I didn't put ..Cells - I put .Cells. (That is probably a result of your web interface.) Taking out
the single dot and using Cells means that the summary table will be placed on the active sheet,
rather than the sheet indicated by the With statement. If that is okay, then you don't need the With
statements. Also, you could also use a worksheet activate command to choose which sheet should be
active.

HTH,
Bernie
MS Excel MVP


"Optitron" wrote in message
...

It worked. The lines that you put ..cells were red so I changed it to
cells and it worked perfect.


--
Optitron
------------------------------------------------------------------------
Optitron's Profile: http://www.excelforum.com/member.php...o&userid=26729
View this thread: http://www.excelforum.com/showthread...hreadid=467639



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 do I pull data from multi sheets into one? Jami Excel Discussion (Misc queries) 2 October 22nd 09 04:53 PM
Best Way to Pull Data from Other Sheets opieandy Excel Discussion (Misc queries) 6 July 12th 09 11:04 PM
Pull Data from multiple sheets KurtB Excel Discussion (Misc queries) 1 January 11th 09 11:46 PM
pull data from multiple sheets with formula referencing a tab name liketotrampoline Excel Discussion (Misc queries) 5 June 20th 08 10:19 PM
to pull from multiple sheets-index,match,vlookup,if,and,or??? ladygr Excel Worksheet Functions 10 November 22nd 07 10:55 AM


All times are GMT +1. The time now is 02:11 PM.

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

About Us

"It's about Microsoft Excel"