Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a named range "NUMBER". When its value is 5, 10, 15, 20, 25, 30 or 35
I want to run sub CopyAggregate(). Is there a more elegant way to write this? If Range("NUMBER").Value = 5 Then CopyAggregate ElseIf Range("NUMBER").Value = 10 Then CopyAggregate ElseIf Range("NUMBER").Value = 15 Then CopyAggregate ElseIf Range("NUMBER").Value = 20 Then CopyAggregate ElseIf Range("NUMBER").Value = 25 Then CopyAggregate ElseIf Range("NUMBER").Value = 30 Then CopyAggregate ElseIf Range("NUMBER").Value = 35 Then CopyAggregate End If Thanks for any suggestions. -- Jim T |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I need to simplify this... | Excel Worksheet Functions | |||
Nested IF statements - simplify? | Excel Programming | |||
Simplify | Excel Programming | |||
A way to simplify this please | Excel Programming | |||
operator statements, shorting when reusing one of the statements? | Excel Programming |