LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Create list of worksheets and cell values

I would like to create a program that will insert a new worksheet that
contains one column for the worksheet name, the value of cell M50 and value
of cell N50. So I will have three columns with multiple rows. The number of
rows will equal the number of worksheets in my workbook. I grabbed this code
from this board (thank you) and tried to modify it but it doesn't work, any
idea's?

Sub GetCellFromWrksheets()
Dim wsNew As Worksheet, wsTemp As Worksheet
Dim r As Range
Dim pdp As String
Dim pmm As String
Set wsNew = Sheets.Add ' add a new worksheet
wsNew.Name = "All_Sheets" ' named "All_Sheets"
Set r = wsNew.Range("A1") ' cell to place the name in
For Each ws In ActiveWorkbook.Sheets 'loop through all worksheets
r = ws.Name ' put the name of the worksheet in the new sheet
pdp = Range("N50")
pmm = Range("M50")
'
'QteNum = Range("B6")
Set r = r.Offset(1, 0) ' move down one cell
Set pdp = pdp.Offset(1, 1)
Set pmm = pmm.Offset(1, 2)
Next ws
' clean up
Set ws = Nothing
Set r = Nothing
Set wsNew = Nothing
End Sub
 
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
Create sorted list based on cell values Jon Excel Discussion (Misc queries) 7 October 9th 09 07:30 AM
Macro to Create Worksheets Based on Cell Values Lilbit Excel Worksheet Functions 3 March 24th 08 05:39 PM
Match values and create a list in one cell notso Excel Discussion (Misc queries) 5 February 5th 07 02:51 AM
Create a list of text from a single cell on several worksheets? deidre Excel Discussion (Misc queries) 4 May 22nd 06 09:49 PM
Count unique values and create list based on these values vipa2000 Excel Worksheet Functions 7 August 5th 05 01:17 AM


All times are GMT +1. The time now is 03:28 AM.

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"