+ Reply to Thread
Results 1 to 3 of 3

0s in =if function are being deleted

  1. #1
    Registered User
    Join Date
    09-10-2012
    Location
    OSLO, NORWAY
    MS-Off Ver
    Excel 2007
    Posts
    3

    0s in =if function are being deleted

    i have used a =mid function to get birth months out of personal numbers from a column. Now i want to use an =if function to convert these numbers into quarters of a year (so that month 01-03 gets a quarter value 1, 04-06 gets 2 and so on. The problem is that my if function is automatically transformed from =if(f2=01;"1"..) to if(f2=1;"1"..). It deletes the 0 in front of the number. So now the =if function in the quarter column doesnt recognise the values with 0 in front of them in the birthmonth column. I dont know how to format away this zero in front of the birthmonth or how to keep the 0s in the =if function. Do anyone have a solution to this? Thank you very much in advance!
    Last edited by sverre123; 09-10-2012 at 12:29 PM.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: 0s in =if function are being deleted

    Hi sverre123,

    You have data numbers as 01,02 denoting months.. are you sure these are numbers ?
    Because your formula dont need to have 01 as 01 OR 1 are treated same in formulas.
    In case of any issues, please upload a sample workbook.. thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: 0s in =if function are being deleted

    probably
    =if(f2="01";"1"..)
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ 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