Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Help ('IF' Statements) Please !!

Is it possible to use an if statement when the reference
cell is a Text value.

Cell a2 is 'Yes'
If(A2=yes,0,A3)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default Help ('IF' Statements) Please !!

Yes.

Try:
If(A2="yes",0,A3)

The text you are testing against must either be in quotations or in a cell,
e.g.

In A4 put, Yes, the the formula becomes

If(A2=A4,0,A3)

--

Regards
Andy Wiggins
www.BygSoftware.com
Home of "Save and BackUp",
"The Excel Auditor" and "Byg Tools for VBA"


"Craig" wrote in message
...
Is it possible to use an if statement when the reference
cell is a Text value.

Cell a2 is 'Yes'
If(A2=yes,0,A3)



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Help ('IF' Statements) Please !!

Hi Craig, you can use IIF or IF as follows.

'-- code -------------------------------
Answer = IIf([A2].Value = "yes", 0, [A3].Value)
MsgBox Answer
'---------------------------------------

'-- code -------------------------------
If [A2].Value = "yes" Then
Answer = 0
Else
Answer = [A3].Value
End If
MsgBox Answer
'---------------------------------------


--
Kind Regards
Colo
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Colo of 'The Road of The Cell Masters' :)

URL:http://www.interq.or.jp/sun/puremis/...astersLink.htm


/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


"Craig" wrote in message
...
Is it possible to use an if statement when the reference
cell is a Text value.

Cell a2 is 'Yes'
If(A2=yes,0,A3)


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
If Statements Julie Excel Discussion (Misc queries) 5 December 10th 07 09:46 PM
if statements jrt Excel Worksheet Functions 3 December 6th 07 09:59 PM
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
if statements, and statements Sum Limit and marking Excel Worksheet Functions 3 March 29th 06 03:25 PM
if statements help Smurphy New Users to Excel 2 February 6th 06 09:23 PM


All times are GMT +1. The time now is 11:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"