+ Reply to Thread
Results 1 to 4 of 4

How to normalize data

  1. #1
    Registered User
    Join Date
    12-13-2007
    Posts
    30

    How to normalize data

    Hello,

    An account number should consist of 7 digits. Sheet 1-When the data was downloaded from an application any account that contains a zero in front of the number then it would drop the zero and becomes an 6 digits account (note: not all accounts have a zero in front). How can I normalize this so that when I try to reference/lookup to the correct account number it would know to match.

    TIA for your efforts.
    Last edited by excellicious; 02-06-2009 at 06:34 AM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to normalize data

    it doesnt matter surely, you could format cell as custom 0000000 so cell shows 0123456
    but the underlying number would stil be 123456
    but a look up or match even if you entered it as 0123456 would still search for 123456 so it would find it.
    however if you have formated the numbers say in column E as text so 0123456 shows when typed and your real numbers are in col a and you want Match E1 in col A and return from col B
    use
    =VLOOKUP(--E1,A:B,2,FALSE) wher the --E converts the text number to a real number
    or even sey
    IF(--E1=A1,"HELLO,"GO AWAY")
    Last edited by martindwilson; 02-05-2009 at 10:49 PM.

  3. #3
    Registered User
    Join Date
    12-13-2007
    Posts
    30

    Re: How to normalize data

    I tested with =IF(--Sheet1!A2=Sheet2!B3,"Great","Oh No") and I got the "Oh No" as the result. If I placed the cursor on cell A2, I get 123456. If I placed the cursor on cell B3, I get 0123456..

    Thank you
    Last edited by excellicious; 02-05-2009 at 11:24 PM.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to normalize data

    a text number in say cell a1 of 0123456 would if you put in b1 =a1 return exactly that0123456 (orientated to left of cell)
    but put in b2 =--a1 returns 0123456 (orientated to right of cell) a test of =isnumber(b1) would show false but of b2 would show true. the -- simply forces the text number to a real number, other ways are to add 0 =a1+0 or multiply by 1 =a1*1
    so the answer is yes it will work in index match if you are comparing text numbers to real.

+ 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