LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 108
Default How to return a number instead of true/false with an if function?

Hi Charles,

You have had a couple of good answers already.

In general, if a function or expression evaluates to TRUE/FALSE, you can
convert it to 1/0 by multiplying by 1.

So
=A1=4
will return TRUE or FALSE depending on the value entered in cell A1, and
=1*(A1=4)
will return 1 or 0 based on the value in cell A1

That means that you can write
=IF(A1=B1,1,0)
or
=1*(A1=B1)
to show 1 or 0 if A1=B1

Ed Ferrero
www.edferrero.com

 
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 a value is found return a true/false lbeemer Excel Discussion (Misc queries) 4 December 3rd 08 10:30 PM
Search for 2 true arguments and return true or false David Excel Discussion (Misc queries) 3 July 15th 06 10:18 AM
Look up to return a true/false value WTG Excel Worksheet Functions 1 April 12th 06 04:14 PM
Function to return True/False if all are validated as True by ISNU Tetsuya Oguma Excel Worksheet Functions 2 March 15th 06 10:28 AM
How do I return True False SimonP Excel Worksheet Functions 1 January 31st 06 04:12 PM


All times are GMT +1. The time now is 09:47 AM.

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"