Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Simple change ?

A little while ago I asked how to automatically update 18 rows across
several spreadsheets and was given the following solution which works really
well.
Now I only have one spreadsheet that I wish to update (sheet1), I have tried
to amend the code by changing bits of it, but I still cannot get it to work.

Could somebody please let me know how to change it so only sheet1 is now
updated

With Thanks

Bob



Sub Macro7()
'
' Macro7 Macro
'
Dim Rng As Range
Dim wks
Dim ws

wks = Array("Sheet1", "Sheet4", "Sheet5", "Sheet7")
For Each ws In wks
Worksheets(ws).Select
Set Rng = Range("B27").End(xlToRight).Resize(18, 1)
Rng.AutoFill Destination:=Rng.Resize(Rng.Rows.Count, 2)
Next
Worksheets("Sheet1").Select
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default Simple change ?

The easiest solution would be to change this line
wks = Array("Sheet1", "Sheet4", "Sheet5", "Sheet7")
to this
wks = Array("Sheet1")

Robin Hammond
www.enhanceddatasystems.com
Check out our XspandXL add-in


"Robert Gillard" wrote in message
...
A little while ago I asked how to automatically update 18 rows across
several spreadsheets and was given the following solution which works

really
well.
Now I only have one spreadsheet that I wish to update (sheet1), I have

tried
to amend the code by changing bits of it, but I still cannot get it to

work.

Could somebody please let me know how to change it so only sheet1 is now
updated

With Thanks

Bob



Sub Macro7()
'
' Macro7 Macro
'
Dim Rng As Range
Dim wks
Dim ws

wks = Array("Sheet1", "Sheet4", "Sheet5", "Sheet7")
For Each ws In wks
Worksheets(ws).Select
Set Rng = Range("B27").End(xlToRight).Resize(18, 1)
Rng.AutoFill Destination:=Rng.Resize(Rng.Rows.Count, 2)
Next
Worksheets("Sheet1").Select
End Sub




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Simple change ?

Try this

Dim Rng As Range
Worksheets("Sheet1").Select
Set Rng = Range("B27").End(xlToRight).Resize(18, 1)
Rng.AutoFill Destination:=Rng.Resize(Rng.Rows.Count, 2)



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Robert Gillard" wrote in message ...
A little while ago I asked how to automatically update 18 rows across
several spreadsheets and was given the following solution which works really
well.
Now I only have one spreadsheet that I wish to update (sheet1), I have tried
to amend the code by changing bits of it, but I still cannot get it to work.

Could somebody please let me know how to change it so only sheet1 is now
updated

With Thanks

Bob



Sub Macro7()
'
' Macro7 Macro
'
Dim Rng As Range
Dim wks
Dim ws

wks = Array("Sheet1", "Sheet4", "Sheet5", "Sheet7")
For Each ws In wks
Worksheets(ws).Select
Set Rng = Range("B27").End(xlToRight).Resize(18, 1)
Rng.AutoFill Destination:=Rng.Resize(Rng.Rows.Count, 2)
Next
Worksheets("Sheet1").Select
End Sub




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
Simple calculation where values change to letters? Zuo Excel Worksheet Functions 3 May 3rd 10 11:48 PM
change array to simple columns Ray S. Excel Discussion (Misc queries) 7 February 4th 09 05:44 PM
Simple way to change text dates to numerical? Kathy Excel Discussion (Misc queries) 7 January 8th 09 02:11 AM
A simple way to change several cell refs to absolute ? Jay Excel Discussion (Misc queries) 6 December 11th 06 11:46 AM
change time into simple number Plan Ahead Excel Worksheet Functions 3 August 30th 06 02:13 PM


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