IF statements

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a HUGE spreadsheet and want to blank out certain cells based upon a
test to see if other cells are also blank. For example:

A B C
1 .5 3
2 .1 0
3 0
4 .3 1

It is easy enough to place an IF statement in column C to test to see if the
cells in column A are blank, which A3 is in this example. But what I want to
do is to use an IF statement (or something else) to write a blank over the
corresponding cell in column B if the cell in column A is also blank. Any
ideas?
 
One way I would do it (if you're looking to do it without using VBA) is like
this:

for each cell in column C (changing the row number as appropriate):
------------------------
=IF(A1="","",A1)
------------------------
This way if Column A is empty it will leave C blank.

for each cell in column D (changing the row number as appropriate):
--------------------------------
=IF(C1="","",IF(B1="","",B1))
--------------------------------
This way if column C (the new column A) is empty
it leaves column D (the new column B) empty.
if C is not empty but B is, it will leave D empty as well.

Then you simply use the info from columns C and D instead of using columns A
and B.
 
Duh. I knew there had to be another way to approach this (without using
VBA...mine is rusty to say the least).

Your approach works. BTW...it looks like one can eliminate the first step
and simply do the test on Column A.

At any rate, thanks for your help.
 
Your approach works. BTW...it looks like one can eliminate the first step
and simply do the test on Column A.
I included it on the chance you needed to see both columns (or the output of
them anyway) side by side. If not then yes, by all means skip the first
part.
At any rate, thanks for your help.
You're very welcome.

CB Hamlyn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top