+ Reply to Thread
Results 1 to 5 of 5

Adding 1 of 2 numbers to a cell to get a specific number

  1. #1
    Registered User
    Join Date
    05-22-2013
    Location
    Illinois
    MS-Off Ver
    Excel 2010
    Posts
    28

    Adding 1 of 2 numbers to a cell to get a specific number

    Hi,

    I need to take a number that is in one cell (that can change) and add either 5 or 7 to it to get one of the following totals - 38 / 42 / 48 / 54.

    I attached the spreadsheet for reference.

    Thank you,
    Attached Files Attached Files
    Last edited by pleasesmile; 06-07-2013 at 09:18 PM.

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Adding 1 of 2 numbers to a cell to get a specific number

    what if you enter a number in Body that won't equal any of those totals by adding 5 or 7....such 34...what should happen?....what should happen if it does?
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  3. #3
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Adding 1 of 2 numbers to a cell to get a specific number

    =SUMPRODUCT(({38,42,48,54}-{5;7}=A10)*{38,42,48,54})

    You will get '0' value if the values don't match either add 5 or 7 to the BODY

  4. #4
    Registered User
    Join Date
    05-22-2013
    Location
    Illinois
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Adding 1 of 2 numbers to a cell to get a specific number

    Perfect! Thank you

  5. #5
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Adding 1 of 2 numbers to a cell to get a specific number

    You're Welcome!

+ 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