Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi all, I want to be able to apply a dynamic conditional IF statement, for example; conditional = "and Range("A30").Value = "60"" If ActiveCell.Value = 40 conditional then 'Do Something End If Is it possible for the above to work? I know it doesn't work as shown above so is there a workaround for it? Thanks All! -- gti_jobert ------------------------------------------------------------------------ gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634 View this thread: http://www.excelforum.com/showthread...hreadid=539832 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If activecell.value=40 and range("A30").value=60 then
'condition tests as true '##################################### ' not sure if you meant 60 in quotes though! '##################################### end if |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I dont think you understood what I wanted to do..... I want the condition variable to be a dynamic so I can put it into the loop - the problem I have is too large to put in here - I just want to know if I can set DYNAMIC CONDITIONAL STATEMENTS. Wrote: If activecell.value=40 and range("A30").value=60 then 'condition tests as true '##################################### ' not sure if you meant 60 in quotes though! '##################################### end if -- gti_jobert ------------------------------------------------------------------------ gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634 View this thread: http://www.excelforum.com/showthread...hreadid=539832 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can't build a conditional if statement like this as a string, but
you may not need to - what makes it conditional - is it (for example) that you are moving gradually away from a given cell (at which point OFFSET comes in handy) or is the value 30 variable - at which point, why? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating a dynamic IF statement | Excel Worksheet Functions | |||
Building Dynamic SUMIF statement | Excel Worksheet Functions | |||
Conditional format to dynamic table | Setting up and Configuration of Excel | |||
Dynamic conditional formatting | Excel Programming | |||
Can I reference a dynamic range within a indirect statement? | Excel Programming |