+ Reply to Thread
Results 1 to 4 of 4

Choose Column in Calculation

  1. #1
    Forum Contributor
    Join Date
    02-16-2006
    Posts
    200

    Choose Column in Calculation

    I use the following formula to calculate the days between 2 dates –

    =if(or(A1="",B1=""),0,B1-A1

    How would the formula look if I wanted to add another column say ‘C1’ – and then for the result to be calculated according to which cell had a date entry e.g. either B1 or C1 - that would then minus A1?

  2. #2
    B. R.Ramachandran
    Guest

    RE: Choose Column in Calculation

    Hi,

    One possibility:

    =IF(A1="",0,IF(AND(B1<>"",C1<>""),"Delete a date (Col B or Col
    C)",IF(AND(B1="",C1=""),0,IF(B1="",C1-A1,B1-A1))))

    Hope this helps,

    Regards,
    B. R. Ramachandran

    "martins" wrote:

    >
    > I use the following formula to calculate the days between 2 dates –
    >
    > =if(or(A1="",B1=""),0,B1-A1
    >
    > How would the formula look if I wanted to add another column say ‘C1’ –
    > and then for the result to be calculated according to which cell had a
    > date entry e.g. either B1 or C1 - that would then minus A1?
    >
    >
    > --
    > martins
    > ------------------------------------------------------------------------
    > martins's Profile: http://www.excelforum.com/member.php...o&userid=31616
    > View this thread: http://www.excelforum.com/showthread...hreadid=529222
    >
    >


  3. #3
    B. R.Ramachandran
    Guest

    RE: Choose Column in Calculation

    Hi,

    One possibility:

    =IF(A1="",0,IF(AND(B1<>"",C1<>""),"Delete a date (Col B or Col
    C)",IF(AND(B1="",C1=""),0,IF(B1="",C1-A1,B1-A1))))

    Hope this helps,

    Regards,
    B. R. Ramachandran

    "martins" wrote:

    >
    > I use the following formula to calculate the days between 2 dates –
    >
    > =if(or(A1="",B1=""),0,B1-A1
    >
    > How would the formula look if I wanted to add another column say ‘C1’ –
    > and then for the result to be calculated according to which cell had a
    > date entry e.g. either B1 or C1 - that would then minus A1?
    >
    >
    > --
    > martins
    > ------------------------------------------------------------------------
    > martins's Profile: http://www.excelforum.com/member.php...o&userid=31616
    > View this thread: http://www.excelforum.com/showthread...hreadid=529222
    >
    >


  4. #4
    Bob Phillips
    Guest

    Re: Choose Column in Calculation

    =IF(OR(A1="",AND(B1="",C1="")),0,MAX(B1,C1)-A1)

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "martins" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I use the following formula to calculate the days between 2 dates -
    >
    > =if(or(A1="",B1=""),0,B1-A1
    >
    > How would the formula look if I wanted to add another column say 'C1' -
    > and then for the result to be calculated according to which cell had a
    > date entry e.g. either B1 or C1 - that would then minus A1?
    >
    >
    > --
    > martins
    > ------------------------------------------------------------------------
    > martins's Profile:

    http://www.excelforum.com/member.php...o&userid=31616
    > View this thread: http://www.excelforum.com/showthread...hreadid=529222
    >




+ 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