ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   if and / or (https://www.excelbanter.com/excel-discussion-misc-queries/256573-if.html)

april

if and / or
 
col a col b col c
6000
-- 6000
i have a this formula in Col C if(a0,"debit","credit"). however, there are
rows where there is nothing in columns A or B so i want Col C to be blank

thanks in advance for your help

aprilshowers

Fred Smith[_4_]

if and / or
 
Assuming the formula you posted just has a typo, use:

=if(count(a1:b1)<2,"",if(a10,"debit","credit"))

Regards,
Fred

"april" wrote in message
...
col a col b col c
6000
-- 6000
i have a this formula in Col C if(a0,"debit","credit"). however, there
are
rows where there is nothing in columns A or B so i want Col C to be blank

thanks in advance for your help

aprilshowers



JLatham

if and / or
 
Try this formula for row 2
=IF(A20,"debit",IF(B20,"credit",""))
and fill down.


"april" wrote:

col a col b col c
6000
-- 6000
i have a this formula in Col C if(a0,"debit","credit"). however, there are
rows where there is nothing in columns A or B so i want Col C to be blank

thanks in advance for your help

aprilshowers


april

if and / or
 
well your solution is certainly a lot simpler than the one i finally came up
with =IF(AND(ISBLANK(D9),ISBLANK(E9))," ",IF(D90,"debit","credit"))

thanks for your help
--
aprilshowers


"JLatham" wrote:

Try this formula for row 2
=IF(A20,"debit",IF(B20,"credit",""))
and fill down.


"april" wrote:

col a col b col c
6000
-- 6000
i have a this formula in Col C if(a0,"debit","credit"). however, there are
rows where there is nothing in columns A or B so i want Col C to be blank

thanks in advance for your help

aprilshowers


JLatham

if and / or
 
One note, and it was sparked by a comment 'Mike H' made:

you seem to have a (bad) habit if inserting a
space
" " instead of a null string "" for the false condition. As a general rule
it is better to return a NULL string for your false condition.

I agree with him on that, as does David Biddulph, see this discussion:

http://www.microsoft.com/office/comm...b-53a7e400e3b9

As David Biddulph explained in that same discussion:
There is a difference between a space " " and the null string "". Strictly
neither of these is the same as a blank cell, but a test for ="" will return
TRUE for either a blank cell or a cell in which "" is returned by a formula,
so I would support Mike's recommendation that you use "", and not " ".

"april" wrote:

well your solution is certainly a lot simpler than the one i finally came up
with =IF(AND(ISBLANK(D9),ISBLANK(E9))," ",IF(D90,"debit","credit"))

thanks for your help
--
aprilshowers


"JLatham" wrote:

Try this formula for row 2
=IF(A20,"debit",IF(B20,"credit",""))
and fill down.


"april" wrote:

col a col b col c
6000
-- 6000
i have a this formula in Col C if(a0,"debit","credit"). however, there are
rows where there is nothing in columns A or B so i want Col C to be blank

thanks in advance for your help

aprilshowers



All times are GMT +1. The time now is 08:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com