#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 111
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 111
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default 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

Reply
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



All times are GMT +1. The time now is 11:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"