Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Returning Two Values From Each Worksheet

Hi,

I have an unspecified number of worksheets (as the User will be adding to
them at regular intervals) and I need to cycle through them all and take two
cell values from each one and paste those values in a hidden worksheet
called "Combined". The two values I need are in D6 and D8 on each worksheet
and I need to create a summary on the "Combined" sheet (just in a long
list).

Does anyone have any ideas on how to acheive this? Any help is greatly
appreciated.

p.s. does anyone know if it is possible to set the BCC email address using
the xl send mail dialog?

Best Regards,

CalumMurdo Kennedy
www.taekwondo.freeserve.co.uk


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default Returning Two Values From Each Worksheet

Sub DoWhat()

Dim intI As Integer
Dim wSht As Worksheet
Dim wShtC As Worksheet

Set wShtC = Worksheets("Combined")
wShtC.Cells.ClearContents
intI = 2

With wShtC
.Cells(1, 1).Value = "Sheet Name"
.Cells(1, 2).Value = "First Range"
.Cells(1, 3).Value = "Second Range"
End With

For Each wSht In ActiveWorkbook.Worksheets
If wSht.Name < "Combined" Then
With wShtC
.Cells(intI, 1).Value = wSht.Name
.Cells(intI, 2).Value = wSht.Range("D6")
.Cells(intI, 3).Value = wSht.Range("D8")
End With
intI = intI + 1
End If
Next wSht

End Sub

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------
I have an unspecified number of worksheets (as the User will be adding to
them at regular intervals) and I need to cycle through them all and take two
cell values from each one and paste those values in a hidden worksheet
called "Combined". The two values I need are in D6 and D8 on each worksheet
and I need to create a summary on the "Combined" sheet (just in a long
list).

Does anyone have any ideas on how to acheive this? Any help is greatly
appreciated.

p.s. does anyone know if it is possible to set the BCC email address using
the xl send mail dialog?

Best Regards,

CalumMurdo Kennedy
www.taekwondo.freeserve.co.uk


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Returning Two Values From Each Worksheet

Hi Paul,

Thanks for that, it works an absolute treat and is very
very fast! I now have some hope of keeping my sanity!

Best Regards,

CalumMurdo Kennedy
www.taekwondo.freeserve.co.uk


-----Original Message-----
Sub DoWhat()

Dim intI As Integer
Dim wSht As Worksheet
Dim wShtC As Worksheet

Set wShtC = Worksheets("Combined")
wShtC.Cells.ClearContents
intI = 2

With wShtC
.Cells(1, 1).Value = "Sheet Name"
.Cells(1, 2).Value = "First Range"
.Cells(1, 3).Value = "Second Range"
End With

For Each wSht In ActiveWorkbook.Worksheets
If wSht.Name < "Combined" Then
With wShtC
.Cells(intI, 1).Value = wSht.Name
.Cells(intI, 2).Value = wSht.Range("D6")
.Cells(intI, 3).Value = wSht.Range("D8")
End With
intI = intI + 1
End If
Next wSht

End Sub

HTH
Paul
----------------------------------------------------------

----------------------------------------------------
Be advised to back up your WorkBook before attempting to

make changes.
----------------------------------------------------------

----------------------------------------------------
I have an unspecified number of worksheets (as the User

will be adding to
them at regular intervals) and I need to cycle through

them all and take two
cell values from each one and paste those values in a

hidden worksheet
called "Combined". The two values I need are in D6 and

D8 on each worksheet
and I need to create a summary on the "Combined" sheet

(just in a long
list).

Does anyone have any ideas on how to acheive this? Any

help is greatly
appreciated.

p.s. does anyone know if it is possible to set the BCC

email address using
the xl send mail dialog?

Best Regards,

CalumMurdo Kennedy
www.taekwondo.freeserve.co.uk


.

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
Sumif using Values, but returning text or values Jose Excel Discussion (Misc queries) 1 April 14th 10 09:01 PM
Returning Values Harlan Excel Discussion (Misc queries) 1 December 12th 06 10:19 PM
Returning Values Troy2006 Excel Discussion (Misc queries) 5 July 31st 06 07:44 PM
Returning a sum when looking up two different values 1stcoast Excel Worksheet Functions 1 April 17th 06 02:45 PM
Returning all values okanem Excel Discussion (Misc queries) 3 March 1st 06 03:52 PM


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