Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A Simple Formula in Excel 1

Status
Not open for further replies.

RayMunro

Technical User
Dec 4, 2001
72
GB
I know this probably has a simple answer but I would be grateful for the help.

I need a cell to show a value of 1 or 0 depending on whether there is data in another cell in the same row or not.

Thank you

 
Yup, its an easy one.

In the cell you want a 1 or 0 enther:

=IF(ISBLANK(<cell with value>),0,1)

Where 0 says "Yes I'm empty"
and 1 says "No, I've got data"

just reverse them if you want them the other way around.


Best Regards,
Scott

"Everything should be made as simple as possible, and no simpler."[hammer]
 
Just for interest, logical functions such as ISBLANK return TRUE or FALSE, which can be translated into their numeric equivalents of 1 or 0 quite easily by multiplying by -1 twice, like this:

=--ISBLANK(<cell with value>)

( the "--" does the multiplying by -1 twice )

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top