Forum Discussion

Douglas997t's avatar
Douglas997t
Brass Contributor
Jun 29, 2022
Solved

Need a formula to (Automatically) change last digit of a multi digit numeric value in a cell

I am working in Excel 365 and am trying to accomplish the following;   I need to auto-correct or change the last digit in a cell where the formula that calculates a multi digit number (ex. $503,500...
  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Jun 29, 2022

    Douglas997t Sorry for not being clear. Perhaps an example will help.

     

    Let's say the original amount is 25. Then MOD will find that the number ends with 5. LOOKUP and RAND will then pick a number from the list {1,2,3,4,6,7,8}, for example 7. The calculation to be made is then:

     

    25 (original) - 5 (last digit found with MOD) + 7 (the random number) = 27

Resources