ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   If This AND That Then...Else... in VBA (https://www.excelbanter.com/excel-programming/355502-if-then-else-vba.html)

Amber_D_Laws[_93_]

If This AND That Then...Else... in VBA
 

Ok, I want to write an if statement (although a Case Select would wor
too) that will test for condition1 AND condition2. Is this eve
possible?

Any help or sage wisdom on the subject is welcome.
Thanks,
Ambe

--
Amber_D_Law

I am currently working for Severn Trent Laboratories as a Projec
Manager's Assistant, and have through helping update lots of ou
operational procedures recently begun learing VB
-----------------------------------------------------------------------
Amber_D_Laws's Profile: http://www.excelforum.com/member.php...fo&userid=3001
View this thread: http://www.excelforum.com/showthread.php?threadid=52035


davesexcel[_46_]

If This AND That Then...Else... in VBA
 

if selection.value10 then
if selection.value=12 then
'your code here'
end if
end i

--
davesexce
-----------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...fo&userid=3170
View this thread: http://www.excelforum.com/showthread.php?threadid=52035


Doug Glancy

If This AND That Then...Else... in VBA
 
Amber,

If condition1 And condition2 then
'your code
end if

hth,

Doug

"Amber_D_Laws"
wrote in message
news:Amber_D_Laws.24diqq_1141859405.9928@excelforu m-nospam.com...

Ok, I want to write an if statement (although a Case Select would work
too) that will test for condition1 AND condition2. Is this even
possible?

Any help or sage wisdom on the subject is welcome.
Thanks,
Amber


--
Amber_D_Laws

I am currently working for Severn Trent Laboratories as a Project
Manager's Assistant, and have through helping update lots of our
operational procedures recently begun learing VBA
------------------------------------------------------------------------
Amber_D_Laws's Profile:

http://www.excelforum.com/member.php...o&userid=30012
View this thread: http://www.excelforum.com/showthread...hreadid=520355




Amber_D_Laws[_94_]

If This AND That Then...Else... in VBA
 

It never ceases to amaze me how complicated I can make something that in
truth is incredibly simple.

Thanks guys!
I appreciate you taking me back to reality and reminding me that VBA
really is just that logical. :)

Take care,


--
Amber_D_Laws

I am currently working for Severn Trent Laboratories as a Project
Manager's Assistant, and have through helping update lots of our
operational procedures recently begun learing VBA
------------------------------------------------------------------------
Amber_D_Laws's Profile: http://www.excelforum.com/member.php...o&userid=30012
View this thread: http://www.excelforum.com/showthread...hreadid=520355



All times are GMT +1. The time now is 04:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com