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: 269
Default Colour Cells onSheet

Hazel, I don't understand the need for 3 if statements. Why can't you
just say
If ws.Name<"Sheet 1" and ws.Name<"Sheet 2" and ws.Name <"Sheet 3"
Then
? James
Hazel wrote:
Hi All

A few days ago I used this forum and sorted out my problems with the following


Sub Macro2()
For Each ws In Worksheets
If ws.Name < "Sheet 1" Then
If ws.Name < "Sheet 2" Then
If ws.Name < "Sheet 3" Then
With ws

.Range("F3:F52").Copy .Range("H3")
.Columns("H:H").Insert Shift:=xlToRight
.Range("F3:F52").ClearContents

'what about this line for each sheet
Sheets("Sheet 1").Range("A2:C26").ClearContents
Application.Goto Sheets("Sheet 2").Range("F3")


End With
End If
End If
End If
Next ws
End Sub

To really finish the macro off and keep my boss happy, in Column H after
running the macro are numbers on the relevant rows and cells (most of the
time their are blank rows and cells between the relevant numbers) what they
would really like to happen is the numbers being deleted and the cells
changing colour so they can see at a glance who is doing the business on that
day.
--
Many thanks

hazel


 
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
colour cells using VBA Lise Excel Discussion (Misc queries) 2 February 4th 10 02:07 AM
Changing all cells in one colour to a different colour Bob Excel Discussion (Misc queries) 3 June 25th 08 02:12 PM
Cells changes colour if.... Derek Excel Worksheet Functions 1 January 23rd 08 10:40 AM
Will excel add cells using colour coding eg Add all red cells Wildwoody Excel Discussion (Misc queries) 4 October 21st 05 01:02 AM
Adding colour to a range of cells based on one of the cells v... McKenna Excel Discussion (Misc queries) 4 March 11th 05 02:25 PM


All times are GMT +1. The time now is 02:49 PM.

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"