ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   IF in formula (https://www.excelbanter.com/excel-programming/360319-if-formula.html)

hme

IF in formula
 

Hi

How can I use IF formula when I mean as below:

IF Cell(1,1)=1,2,3 then

Do something

End if


--
hme
------------------------------------------------------------------------
hme's Profile: http://www.excelforum.com/member.php...o&userid=15930
View this thread: http://www.excelforum.com/showthread...hreadid=538025


Ardus Petus

IF in formula
 
In VBA:
Select Case Cells(1, 1).Value
Case 1, 2, 3
MsgBox "1, 2 or 3"
Case Else
MsgBox "Something else"
End Select

HTH
--
AP

"Don Guillett" a écrit dans le message de news:
...
try
If Cells(1, 1) 0 And Cells(1, 1) < 4 Then MsgBox "Hi"

--
Don Guillett
SalesAid Software

"hme" wrote in message
...

Hi

How can I use IF formula when I mean as below:

IF Cell(1,1)=1,2,3 then

Do something

End if


--
hme
------------------------------------------------------------------------
hme's Profile:
http://www.excelforum.com/member.php...o&userid=15930
View this thread:
http://www.excelforum.com/showthread...hreadid=538025






Don Guillett

IF in formula
 
try
If Cells(1, 1) 0 And Cells(1, 1) < 4 Then MsgBox "Hi"

--
Don Guillett
SalesAid Software

"hme" wrote in message
...

Hi

How can I use IF formula when I mean as below:

IF Cell(1,1)=1,2,3 then

Do something

End if


--
hme
------------------------------------------------------------------------
hme's Profile:
http://www.excelforum.com/member.php...o&userid=15930
View this thread: http://www.excelforum.com/showthread...hreadid=538025




Tom Ogilvy

IF in formula
 
If cells(1,1) = 1 or cells(1,1) = 2 or cells(1,1) = 3 then


end if

--
Regards,
Tom Ogilvy


"hme" wrote:


Hi

How can I use IF formula when I mean as below:

IF Cell(1,1)=1,2,3 then

Do something

End if


--
hme
------------------------------------------------------------------------
hme's Profile: http://www.excelforum.com/member.php...o&userid=15930
View this thread: http://www.excelforum.com/showthread...hreadid=538025




All times are GMT +1. The time now is 04:29 PM.

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