Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I pull data from multi sheets into one? | Excel Discussion (Misc queries) | |||
Best Way to Pull Data from Other Sheets | Excel Discussion (Misc queries) | |||
Pull Data from multiple sheets | Excel Discussion (Misc queries) | |||
pull data from multiple sheets with formula referencing a tab name | Excel Discussion (Misc queries) | |||
to pull from multiple sheets-index,match,vlookup,if,and,or??? | Excel Worksheet Functions |