ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If A1=HR then... (https://www.excelbanter.com/excel-discussion-misc-queries/78318-if-a1%3Dhr-then.html)

ZOEY

If A1=HR then...
 

I have been trying to get a formula to work for the following:

Cell A3 Cell D3 Cell H3 Cell I3 Cell K3
HR 0.00 0.00 -10.00 (answer in this
example -10.00)

I need a formula in Cell K3 that would do the following; If A3=HR, then
enter value in D3 unless blank or zero, then enter value from H3 unless
blank or zero, then enter value from I3.

I can get it to work if I only have 2 cells for it to look. How can I
get it to consider 3 different cells? There will only be one of the
three cells with a value.

Thanks Zoey


--
ZOEY
------------------------------------------------------------------------
ZOEY's Profile: http://www.excelforum.com/member.php...o&userid=32616
View this thread: http://www.excelforum.com/showthread...hreadid=524100



If A1=HR then...
 
One solution would be to nest your "ifs" .
I didn't test this but it's close to what it sounds like you want. Not sure
if the test for text will work.

if(A3<0,(if(D3=0,I3,D3),"")

Or this way.
=IF(A1<0,MAX(B1,C1,D1),"none")

" I have been trying to get a formula to work for the following:

Cell A3 Cell D3 Cell H3 Cell I3 Cell K3
HR 0.00 0.00 -10.00 (answer in this
example -10.00)

I need a formula in Cell K3 that would do the following; If A3=HR, then
enter value in D3 unless blank or zero, then enter value from H3 unless
blank or zero, then enter value from I3.

I can get it to work if I only have 2 cells for it to look. How can I
get it to consider 3 different cells? There will only be one of the
three cells with a value.

Thanks Zoey


--
ZOEY
------------------------------------------------------------------------
ZOEY's Profile:
http://www.excelforum.com/member.php...o&userid=32616
View this thread: http://www.excelforum.com/showthread...hreadid=524100




daddylonglegs

If A1=HR then...
 

If only one of the cells can have a value just sum them

=IF(A3="HR",SUM(D3,H3:I3),"")


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=524100


Steve Yandl

If A1=HR then...
 
Try this,

=IF(A3="HR",IF(OR(ISBLANK(D3),D3=0),IF(OR(ISBLANK( H3),H3=0),I3,H3),D3),"")


Steve



"ZOEY" wrote in message
...

I have been trying to get a formula to work for the following:

Cell A3 Cell D3 Cell H3 Cell I3 Cell K3
HR 0.00 0.00 -10.00 (answer in this
example -10.00)

I need a formula in Cell K3 that would do the following; If A3=HR, then
enter value in D3 unless blank or zero, then enter value from H3 unless
blank or zero, then enter value from I3.

I can get it to work if I only have 2 cells for it to look. How can I
get it to consider 3 different cells? There will only be one of the
three cells with a value.

Thanks Zoey


--
ZOEY
------------------------------------------------------------------------
ZOEY's Profile:
http://www.excelforum.com/member.php...o&userid=32616
View this thread: http://www.excelforum.com/showthread...hreadid=524100




Steve Yandl

If A1=HR then...
 
The example showed numerical values in D3, H3 and I3 but what if one or more
of the values is text that can't be interpreted as a number value?



"daddylonglegs"
wrote in message
news:daddylonglegs.24xyuo_1142813401.0826@excelfor um-nospam.com...

If only one of the cells can have a value just sum them

=IF(A3="HR",SUM(D3,H3:I3),"")


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile:
http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=524100




daddylonglegs

If A1=HR then...
 

Hi Steve,

Of course you're right. I'm assuming the cells will either be blank or
numeric...., perhaps I shouldn't be....


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=524100


ZOEY

If A1=HR then...
 

:)

Thank you ALL for the replies!! DaddyLongLegs... It worked! The 3
cells will only have numeric.

Zoey


--
ZOEY
------------------------------------------------------------------------
ZOEY's Profile: http://www.excelforum.com/member.php...o&userid=32616
View this thread: http://www.excelforum.com/showthread...hreadid=524100



All times are GMT +1. The time now is 10:52 PM.

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