+ Reply to Thread
Results 1 to 6 of 6

expanding an IF formula

  1. #1
    Registered User
    Join Date
    07-16-2009
    Location
    Cartersville, Georgia
    MS-Off Ver
    Excel 2007
    Posts
    43

    expanding an IF formula

    [qoute]I have five cells that I am working with cells A,B,C,D & E. cells B & C are time formated. Cells D & E are number formated and equal the number of hours between cells B & C. the difference is that if cell D is less that 2 hrs then cell E is to equal 2 hrs but if cell D is over 2 hrs then cell E equals the value of cell D. All this works fine but I am needing to add in the value of cell A. So if I have say CT in cell A then cell E will equal the value of cell D no matter if is less than 2 hrs[/quote]
    Attached Files Attached Files
    Last edited by tvonbehren; 10-30-2009 at 03:01 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: expanding an IF formula

    Try:

    =IF(OR(A2="CT",D2>2),D2,2)

    copied down
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    07-16-2009
    Location
    Cartersville, Georgia
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: expanding an IF formula

    Thank you very much I really appreciate it. I thought was to use OR but could not get it just right. again thanks

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: expanding an IF formula

    tvonbehren, going forward please ensure you post in an appropriate forum

    (thread moved to Worksheet Functions from Tips & Tutorials)

  5. #5
    Registered User
    Join Date
    07-16-2009
    Location
    Cartersville, Georgia
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: expanding an IF formula

    Ok the formula is what I was looking for but now I am needing to have additional text in the cell. Like the letters CT or OT so that if either is entered into cell B to it changes the value in cell E. Is an either/or situation. Oh and sorry if is in the wrong area but did not want to confuse people with same kind of post, just a little different.
    Last edited by tvonbehren; 10-30-2009 at 01:14 PM.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: expanding an IF formula

    Do you mean?

    =IF(OR(A2="CT",A2="OT",D2>2),D2,2)

+ 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