Quizzes & Puzzles3 mins ago
Next Excel Spreadsheet Question ... Leaving A Cell Blank
16 Answers
If I put any number at all into Cell B7,
I want Cell H7 to show the word "Purchase"
If I leave B7 empty,
I want H7 to stay empty.
So far, in H7, I've got ...
=IF(B7>0,"Purchase", ,)
Not sure how to finish it off.
I want Cell H7 to show the word "Purchase"
If I leave B7 empty,
I want H7 to stay empty.
So far, in H7, I've got ...
=IF(B7>0,"Purchase", ,)
Not sure how to finish it off.
Answers
Best Answer
No best answer has yet been selected by joggerjayne. Once a best answer has been selected, it will be shown here.
For more on marking an answer as the "Best Answer", please visit our FAQ.I think it's more sensible to test the value of cell B7 by comparing it specifically to an empty cell rather than greater than 0 (just in case, magically, you wanted to put a negative number into cell B7), but otherwise OG's solution is correct. To ask Excel to leave the cell empty, one should put in the final part two adjacent speech marks "".
Hence
=IF(B7="","","Purchase")
is my choice.
Hence
=IF(B7="","","Purchase")
is my choice.
http:// www.tec honthen et.com/ excel/f ormulas /isblan k.php
TRy
IF ((ISBLANK(CELLNAME)),"","Purchase")
See if that works.
TRy
IF ((ISBLANK(CELLNAME)),"","Purchase")
See if that works.
The catch with either of our formulas (although OG's is better syntax) is that if you accidentally put anything at all into cell B7 then it would come out as "Purchase". The only way around that might be to redesign the spreadsheet so that a "no purchase" cell in B7 is not left blank but filled with something like "null", over which there can be less ambiguity, and you could even have a double-if statement, such as:
=IF(B7="null","",IF(B7>0,"Purchase",""))
Which means that if you accidentally typed "Null" then you'd still get a blank cell, as the second If statement forces "Purchase" only if the information in B7 can be interpreted as a number (greater than 0).
=IF(B7="null","",IF(B7>0,"Purchase",""))
Which means that if you accidentally typed "Null" then you'd still get a blank cell, as the second If statement forces "Purchase" only if the information in B7 can be interpreted as a number (greater than 0).
Related Questions
Sorry, we can't find any related questions. Try using the search bar at the top of the page to search for some keywords, or choose a topic and submit your own question.