+ Reply to Thread
Results 1 to 3 of 3

Need to create a new number depending a value of the original number

  1. #1
    Registered User
    Join Date
    07-24-2013
    Location
    Delta, BC
    MS-Off Ver
    Excel 2007
    Posts
    1

    Question Need to create a new number depending a value of the original number

    I need to create a new number based on conditional findings of the original number, using 3 sets of criteria as follows:

    If a number (no decimals) ends with:

    a) 0, 9, 8 or 1 = the new number ends with 8

    b) 2 or 3 = the new number ends with 3

    c) 4, 5, 6, or 7 = the new number ends with 7

    For Example:

    400 new number = 408

    312 new number = 313

    544 new number = 547

    Please help, I very much appreciate it!!

    Thanks kindly, Dale

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,945

    Re: Need to create a new number depending a value of the original number

    =if(or(A1=0,A1=9,A1=8,A1=1),Left(A1,2)&8,if(or(A1=2,A1=3),Left(A1,2)&3,Left(A1,2)&7))
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,819

    Re: Need to create a new number depending a value of the original number

    With your number in A1, you can use this formula (e.g. in B1):

    =INT(A1/10)*10+IF(MOD((A1-2)/10,1)*10<2,3,IF(MOD((A1+2)/10,1)*10<5,8,7))

    Hope this helps.

    Pete

+ 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] automatically show the equivalent number in column B depending on the number in columnA
    By Elainefish in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-31-2013, 04:19 AM
  2. Validation Number number number + letter depending on numbers
    By Adamitus in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-31-2012, 04:28 AM
  3. Replies: 1
    Last Post: 05-24-2012, 10:43 AM
  4. Making % add up to the original whole number?
    By Stephen in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-16-2006, 06:45 PM
  5. Copy a number from one cell to another depending on first number
    By marcia driscoll in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-03-2005, 04:06 PM

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