+ Reply to Thread
Results 1 to 6 of 6

Conditional Formula: If Text, rep as number to sum, else sum numbers.

  1. #1
    Registered User
    Join Date
    12-29-2008
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Conditional Formula: If Text, rep as number to sum, else sum numbers.

    I can get only so far, then stumped:
    • 3 columns (Hours, Rate, Amount)
    • "Hours" is a 'List' with data from from another sheet.
    • Data is named 'Worked'.
    • 'Worked' is all 2 decimal numeric (represents total time worked), except first item called "Live In"

    IF 'Hours' is "Live In", I can use:
    =IF(A1="Live In", SUM(B1*1))
    How can I make it conditional so that if it's not "Live In", then it will SUM(A1*B1)?

    SideNote: 'Worked' LIST has total time with minutes expressed as 1/4 of hour (i.e., 1.25 = 1 hour, 15 minutes).

    Thanks.
    Last edited by etal; 12-29-2008 at 06:19 PM.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Test for specific text value

    Maybe this(?)
    Please Login or Register  to view this content.
    Does that help?
    (if NO...please post a sample workbook to help us understand)
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Or maybe =IF(A1="Live In", B1, A1 * B1)
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    12-29-2008
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Almost There

    THANK YOU!

    (duh!) Nothing like making things more complicated than it should be.
    I don't need to calculate the rate if it's the same amount!

    Would you also be able to tell me how to keep 'C1' (Amount) blank if there were no entries for 'A1' (Hours) and 'B1' (Rate)?

  5. #5
    Registered User
    Join Date
    12-29-2008
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Talking OK- Figured it out.

    Okay, tried the following and got what I wanted. The following worked.
    THANK YOU SOOO MUCH!
    =IF((OR(A1="",B1="")),"",IF(A1="Live In", B1, A1*B1))

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

+ 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