Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dynamic Conditional Statement


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default Dynamic Conditional Statement

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dynamic Conditional Statement


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default Dynamic Conditional Statement

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
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
Creating a dynamic IF statement Robert Robinson Excel Worksheet Functions 2 February 17th 10 05:09 PM
Building Dynamic SUMIF statement Nancy Taylor Excel Worksheet Functions 17 September 23rd 09 04:23 PM
Conditional format to dynamic table Juan C. Setting up and Configuration of Excel 1 September 7th 09 01:21 PM
Dynamic conditional formatting Chris Excel Programming 1 July 1st 05 06:01 PM
Can I reference a dynamic range within a indirect statement? BCW Excel Programming 1 December 24th 04 01:06 AM


All times are GMT +1. The time now is 02:56 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"