+ Reply to Thread
Results 1 to 3 of 3

Formula needed to extract a number from a cell

  1. #1
    Registered User
    Join Date
    09-07-2013
    Location
    Chester
    MS-Off Ver
    Home: 2011 for Mac Work: 2007
    Posts
    70

    Formula needed to extract a number from a cell

    Calling all Excel wizards

    I have a sheet that contains about 12000 of rows of data which unfortunately is very inconsistent in how it’s presented, it’s a raw data file that I’m sent from an external company and can’t be reformatted. The data contains various employee profile information such as employee numbers, phone log ons etc. In some rows the employee number may be in column A, in another it may be in column D and so on, which is making life very difficult trying to complete lookups etc. Some rows may contain 5 cells worth of data, others may contain up to 20

    This is an example of a formula I’ve used to combine the cell data in a row ="I"&F2&"I"&G2&"I"&H2&"I"&I2&"I"&J2&"I"&K2&"I" (Thanks to a previous forum solution by mrice)

    The result for example being the following…. I1234567I};{IS01DPAIglobal\1144518I}}III

    I’m then using the below formula to check whether an employee number is present in the previous formula result

    =IF(COUNTIF(Extract!$C$2:$C$13000,"*I"&C1&"I*")>0,"TRUE","FALSE")

    So if C1 contains 1234567, the result will be TRUE

    So my sheet contains 12000 results from the first formula, and I have say 8000 employee numbers I need to look up, so I can check which of the 8000 employees are referenced in the list of 12000, however I now need to be able to highlight the other 4000 that don’t contain one of the 8000 employee numbers if that makes sense

    I’m thinking I somehow need to extract the employee number from the formula result, and I can then run a conventional lookup. The issue is the employee number isn't always in the same place

    I hope that makes some sort of sense, any suggestions would be very welcome

    Twaddy

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Formula needed to extract a number from a cell

    Try this one

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    v C D
    2 I2234567I};{IS01DPAIglobal\1144518I}}III FALSE
    3 I3234567I};{IS01DPAIglobal\1234567I}}III TRUE
    4 I1234567I};{IS01DPAIglobal\1144518I}}III
    TRUE
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Registered User
    Join Date
    09-07-2013
    Location
    Chester
    MS-Off Ver
    Home: 2011 for Mac Work: 2007
    Posts
    70

    Re: Formula needed to extract a number from a cell

    Hi Alkey

    Thanks very much for your response and apologies I'm only replying now

    As I have approx 8000 IDs I need to check your formula wouldn't quite do what I need, which in hindsight I didn't explain very well. I essentially need the 7 digit number from C2 to populate in D2 for each row

    I also posted on an alternative site and had the following suggestion as a UDF which seems to work very well for what I need

    Thanks again

    Please Login or Register  to view this content.

+ 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. Formula help needed to extract cell value based on max if array.
    By wilbur0787 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 07-15-2015, 08:27 AM
  2. [SOLVED] Formula to extract Registration Number (ABN) from text in a cell
    By &Roo in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 01-20-2015, 05:39 AM
  3. Formula needed to populate associate name when ID number entered in another cell
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-20-2013, 12:06 AM
  4. [SOLVED] Formula needed to extract number
    By MHamid in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-01-2013, 02:43 PM
  5. [SOLVED] Need to find a formula to extract a number out of a cell that also has letters
    By Cassi in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-25-2013, 09:39 PM
  6. Excel Formula to Extract a Number from a Cell
    By housinganalyst in forum Excel General
    Replies: 4
    Last Post: 07-29-2011, 11:41 AM
  7. [SOLVED] extract number and use in formula from text & numbers in cell
    By ivory_kitten in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-14-2006, 12:45 AM

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