+ Reply to Thread
Results 1 to 7 of 7

If A1=HR then...

  1. #1
    Registered User
    Join Date
    03-19-2006
    Posts
    2

    Question 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

  2. #2
    Guest

    Re: 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
    >




  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    If only one of the cells can have a value just sum them

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

  4. #4
    Steve Yandl
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    >
    > 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
    >




  5. #5
    Steve Yandl
    Guest

    Re: 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" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > 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
    >




  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Hi Steve,

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

  7. #7
    Registered User
    Join Date
    03-19-2006
    Posts
    2

    If A1=HR Thank You



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

    Zoey

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1