Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default working with a group of sheets

how would you do this without selecting? or by using the index number 1-3
instead of the sheet names?

Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
With Range("m28")
..Value = "test"
..Font.Bold = True
End With

--


Gary


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default working with a group of sheets

Sheets(Array(Worksheets(1).Name, Worksheets(2).Name,
Worksheets(3).Name)).Select
With Range("m28")
..Value = "test"
..Font.Bold = True
End With


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"GKeramidas" wrote in message
...
how would you do this without selecting? or by using the index number 1-3
instead of the sheet names?

Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
With Range("m28")
.Value = "test"
.Font.Bold = True
End With

--


Gary




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default working with a group of sheets

thanks for the reply bob.
2 things

this doesn't put the value test into all 3 sheets, only the active one.
also, is there way to enter a value into all 3 sheets without selecting?

--


Gary


"Bob Phillips" wrote in message
...
Sheets(Array(Worksheets(1).Name, Worksheets(2).Name,
Worksheets(3).Name)).Select
With Range("m28")
.Value = "test"
.Font.Bold = True
End With


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"GKeramidas" wrote in message
...
how would you do this without selecting? or by using the index number
1-3
instead of the sheet names?

Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
With Range("m28")
.Value = "test"
.Font.Bold = True
End With

--


Gary





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default working with a group of sheets

Sorry Gary, this works

Dim i As Long

For i = 1 To 3
With Worksheets(i).Range("M28")
.Value = "test"
.Font.Bold = True
End With
Next i


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"GKeramidas" wrote in message
...
thanks for the reply bob.
2 things

this doesn't put the value test into all 3 sheets, only the active one.
also, is there way to enter a value into all 3 sheets without selecting?

--


Gary


"Bob Phillips" wrote in message
...
Sheets(Array(Worksheets(1).Name, Worksheets(2).Name,
Worksheets(3).Name)).Select
With Range("m28")
.Value = "test"
.Font.Bold = True
End With


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"GKeramidas" wrote in message
...
how would you do this without selecting? or by using the index number
1-3
instead of the sheet names?

Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
With Range("m28")
.Value = "test"
.Font.Bold = True
End With

--


Gary







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default working with a group of sheets

hi bob:

that's what i am using, just thought there might be a way to do it all at
once.

thanks
--


Gary


"Bob Phillips" wrote in message
...
Sorry Gary, this works

Dim i As Long

For i = 1 To 3
With Worksheets(i).Range("M28")
.Value = "test"
.Font.Bold = True
End With
Next i


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"GKeramidas" wrote in message
...
thanks for the reply bob.
2 things

this doesn't put the value test into all 3 sheets, only the active one.
also, is there way to enter a value into all 3 sheets without selecting?

--


Gary


"Bob Phillips" wrote in message
...
Sheets(Array(Worksheets(1).Name, Worksheets(2).Name,
Worksheets(3).Name)).Select
With Range("m28")
.Value = "test"
.Font.Bold = True
End With


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"GKeramidas" wrote in message
...
how would you do this without selecting? or by using the index number
1-3
instead of the sheet names?

Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
With Range("m28")
.Value = "test"
.Font.Bold = True
End With

--


Gary










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
Group under Data Group and Outline Data not working. Help. Michele Excel Worksheet Functions 2 May 18th 09 07:45 PM
Search For function in discussion group not working Nadine Excel Discussion (Misc queries) 5 April 12th 08 12:15 AM
Group Sheets Brian Keanie Excel Discussion (Misc queries) 10 January 1st 05 08:34 PM
Working with a large group of numbers Majoe4 Excel Worksheet Functions 1 December 10th 04 07:29 PM
Working with large group of numbers in a column hornsby Excel Programming 2 October 30th 04 12:46 AM


All times are GMT +1. The time now is 06:09 AM.

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"