Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
colour cells using VBA | Excel Discussion (Misc queries) | |||
Changing all cells in one colour to a different colour | Excel Discussion (Misc queries) | |||
Cells changes colour if.... | Excel Worksheet Functions | |||
Will excel add cells using colour coding eg Add all red cells | Excel Discussion (Misc queries) | |||
Adding colour to a range of cells based on one of the cells v... | Excel Discussion (Misc queries) |