+ Reply to Thread
Results 1 to 6 of 6

Formula adds a zero to the final value

  1. #1
    Forum Contributor
    Join Date
    11-17-2018
    Location
    Los Angeles
    MS-Off Ver
    Office 2010
    Posts
    208

    Formula adds a zero to the final value

    Formula adds a zero to the final value

    I need some help please.

    Please see attached file.

    The gray cells are a result of formulas referring to other cells.

    The yellow cells will only contain X or be blank.


    For the red cell, the DESIRED RESULT:
    If the yellow cells are blank, then the red cell should return 0 (zero) - as a number.
    If one of the yellow cells has an X, then it should return the value contained in the corresponding gray cell (either 5 or 9).
    If both cells have an X, then it should return their combined value (not added, but as two numbers put together, in this case 95).

    CURRENT PROBLEM:
    When the yellow cells have an X, it add the zero to the value of the gray cell to make it 50 instead of 5, or 90 instead of 9, or 950 instead of 95.


    How to stop adding 0 (zero) to the result when the yellow cells contains an X, but still have 0 if the yellow cells are blanks?

    In other words, all the possible results should be: 5, or 9, or 95, or 0 (zero).
    Attached Files Attached Files
    Last edited by Luisftv; 11-11-2021 at 08:33 PM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Formula adds a zero to the final value

    =if(bc3&bc4="xx",bc2*10+bc1,if(bc3="x",bc1,0)+if(bc4="x",bc2,0))
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Formula adds a zero to the final value

    Please Login or Register  to view this content.
    Is this working for you?

    WBD
    Office 365 on Windows 11, looking for rep!

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: Formula adds a zero to the final value

    And another:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Forum Contributor
    Join Date
    11-17-2018
    Location
    Los Angeles
    MS-Off Ver
    Office 2010
    Posts
    208

    Re: Formula adds a zero to the final value

    Amazing!!! Thank you so much.

    All the solutions do exactly what it is needed.

    The only one I needed to add a 0 (zero) in the formula was in post #3, by WideBoyDixon, and then it works flawlessly. Here it is with the zero:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Thank you mehmetcik. Thank you WideBoyDixon. Thank you TMS.

    I will analyze each solution and make sure I learn from them all.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: Formula adds a zero to the final value

    You're welcome. Thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Want the final value = 7, what is the formula?
    By wongsiuon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-06-2019, 10:56 PM
  2. Replies: 1
    Last Post: 08-26-2019, 10:54 AM
  3. Creating a Final Estimate Form and a Final Materials List based on Worksheet Results
    By Crunched For Time in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 12-20-2013, 09:58 PM
  4. Replies: 19
    Last Post: 03-04-2013, 01:16 PM
  5. replacing lowest test grade with final if final is higher formula help
    By colbyclay in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-16-2012, 02:48 AM
  6. Replies: 0
    Last Post: 12-22-2011, 03:42 PM
  7. Replies: 2
    Last Post: 01-06-2010, 05:51 AM

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