Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Great, many thanks works perfectly..
"Bob Phillips" wrote: Dim rng As Range Set rng = ActiveSheet.Range("D2") With rng Select Case UCase(.Value) Case "MONDAY" 'Do something, ' Sheets("24HR").Rows("7:126").Copy Sheets("MON").Range("A7") Case "TUESDAY" 'Do something, ' Sheets("24HR").Rows("7:126").Copy Sheets("TUE").Range("A7") Case "WEDNESDAY" 'Do something, ' Sheets("24HR").Rows("7:126").Copy Sheets("WED").Range("A7") End Select End With or even Dim rng As Range Set rng = ActiveSheet.Range("D2") With rng 'Do something, ' Sheets("24HR").Rows("7:126").Copy Sheets(UCase(.Value)).Range("A7") End With -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "thomsonpa" wrote in message ... Can anybody help explain why the following code does not work? The value in range D2 is =TEXT($C$2,"DDDDDD"), c2 is todays date Dim rng As Range Set rng = ActiveSheet.Range("D2") With rng If .Value = "MONDAY" Then 'Do something, ' Sheets("MON").Select ActiveSheet.Rows("7:126").Select Selection.Copy Sheets("24HR").Select ActiveSheet.Rows("7:126").Select ActiveSheet.Paste Else If .Value = "TUESDAY" Then 'Do something, ' Sheets("TUE").Select ActiveSheet.Rows("7:126").Select Selection.Copy Sheets("24HR").Select ActiveSheet.Rows("7:126").Select ActiveSheet.Paste Else If .Value = "WEDNESDAY" Then 'Do something, ' Sheets("WED").Select ActiveSheet.Rows("7:126").Select Selection.Copy Sheets("24HR").Select ActiveSheet.Rows("7:126").Select ActiveSheet.Paste Else End If End If End If End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF not working | Excel Worksheet Functions | |||
Sum(if not working | Excel Discussion (Misc queries) | |||
if not working | Excel Discussion (Misc queries) | |||
was working, now :( | Excel Worksheet Functions | |||
Working out UK tax | New Users to Excel |