Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Cell values from mulitiple worksheets to two columns on another ws

Oh Wise Ones,
I have browsed some previous posts for a similar request
but I could not find an example that I was capable of editing for my purpose.
Heres what I would like to accomplish. I have multiple worksheets in a
workbook and more may be added at any time. I need to retrieved the values in
cells F2(Date reported) and F4(Date of Incident) from ALL other existing
worksheets and place them in column H and J respectively of a worksheet
called "Control" in the same workbook. Obviously the range in column H and J
would automatically grow as more sheets are added. Any help would be
appreciated.

Thanks,
Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
Art Art is offline
external usenet poster
 
Posts: 587
Default Cell values from mulitiple worksheets to two columns on another ws

Try this:

Sub test()
Dim ws As Worksheet
Dim i As Integer
For Each ws In Worksheets
If ws.Name < "Control" Then
i = i + 1
Sheets("Control").Cells(i, 8) = ws.Cells(2, 6)
Sheets("Control").Cells(i, 10) = ws.Cells(4, 6)
End If
Next
End Sub

This code would be placed in a new module.


"Mike K" wrote:

Oh Wise Ones,
I have browsed some previous posts for a similar request
but I could not find an example that I was capable of editing for my purpose.
Heres what I would like to accomplish. I have multiple worksheets in a
workbook and more may be added at any time. I need to retrieved the values in
cells F2(Date reported) and F4(Date of Incident) from ALL other existing
worksheets and place them in column H and J respectively of a worksheet
called "Control" in the same workbook. Obviously the range in column H and J
would automatically grow as more sheets are added. Any help would be
appreciated.

Thanks,
Mike

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Cell values from mulitiple worksheets to two columns on anothe

Thanks Art! You guys are awesome!

Mike

"Art" wrote:

Try this:

Sub test()
Dim ws As Worksheet
Dim i As Integer
For Each ws In Worksheets
If ws.Name < "Control" Then
i = i + 1
Sheets("Control").Cells(i, 8) = ws.Cells(2, 6)
Sheets("Control").Cells(i, 10) = ws.Cells(4, 6)
End If
Next
End Sub

This code would be placed in a new module.


"Mike K" wrote:

Oh Wise Ones,
I have browsed some previous posts for a similar request
but I could not find an example that I was capable of editing for my purpose.
Heres what I would like to accomplish. I have multiple worksheets in a
workbook and more may be added at any time. I need to retrieved the values in
cells F2(Date reported) and F4(Date of Incident) from ALL other existing
worksheets and place them in column H and J respectively of a worksheet
called "Control" in the same workbook. Obviously the range in column H and J
would automatically grow as more sheets are added. Any help would be
appreciated.

Thanks,
Mike

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 enter data simultaneously on mulitiple worksheets? carolinagirl0050 Setting up and Configuration of Excel 2 July 21st 09 05:41 PM
Mulitiple Count of occurrences in different columns Ant Excel Worksheet Functions 3 June 3rd 09 08:34 PM
How do I summarize items chosen on mulitiple worksheets Sunshine Excel Worksheet Functions 0 September 26th 07 04:52 PM
Alphabetizing mulitiple worksheets in Excel 2003? Deena at DCH FD Excel Discussion (Misc queries) 2 June 13th 06 04:24 PM
select mulitiple columns and items from a listbox TK Excel Programming 1 August 26th 04 05:15 AM


All times are GMT +1. The time now is 03:12 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"