How to fix a cell format on Excel

Gerardo Albornoz 20 Reputation points
2025-12-09T20:29:28.2033333+00:00

I posted this question last week but the answer I received did not resolve the issue.

When using this function (converts lb and oz to oz):=(TRUNC(O6)*16)+IFERROR(MID(O6,(FIND(".",O6))+1,LEN(O6)),0), for this a cell that reads: 16 lb . 10 oz , the results is 257 oz , but it should be 266 oz. The function(s) is taking the 10 oz as 1 oz; what is wrong, how can I fix this? On column P i am converting

As shown on the added screenshot the formula works fine for other values; the issue is only when the value is xx . 10 oz, or xx . 20 oz, or xx . 30 oz, and so on. These values are 10 oz, 20 oz, and 30 oz but Excel is reconozided them as 1 oz, 2 oz, and 3 oz.

How could I fix this issue? Thank you.

GA Excel Screenshot

Microsoft 365 and Office | Excel | For home | MacOS
0 comments No comments
{count} votes

Answer accepted by question author
  1. Marcin Policht 68,535 Reputation points MVP Volunteer Moderator
    2025-12-11T00:56:02.4166667+00:00

    Try the following

    =IF(
      ISNUMBER(O6),
      INT(O6)*16 + VALUE(RIGHT(TEXT(O6,"0.00"),2)),
      VALUE(LEFT(O6, FIND(" lb", O6) - 1))*16
        + VALUE(TRIM(MID(O6, FIND(".", O6) + 1, FIND(" oz", O6) - FIND(".", O6) - 1)))
    )
    
    

    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.