+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : Look up formula

  1. #1
    Registered User
    Join Date
    06-01-2012
    Location
    Canberra, Australia
    MS-Off Ver
    Excel 2010
    Posts
    10

    Look up formula

    I have a large spreadsheet with site specific information on multiple buildings within the same site.

    Each piece of equipment has a unique asset number eg 0123-456-789-001(all contained in a single cell).

    Each number means something different 0123(site)-456(building number)-789(asset description)-001(equipment number)

    I need to create a formula to count the number of buildings within the site.

    For example:

    Asset Numbers:
    0123-456-789-001
    0123-654-789-001
    0123-123-789-001

    If this was the data I was analysing I want to look at the second group of numbers(being the building number) to access how many building there are. In this case there is three different buildings and that is the outcome I need from the formula.

    Any help would be appreciated.

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

    Re: Look up formula

    Hi CCSFM,

    Welcome to the forum.

    See the attached file:-
    Asset Number.xlsx

    Regards,
    DILIPandey

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

  3. #3
    Registered User
    Join Date
    06-01-2012
    Location
    Canberra, Australia
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Look up formula

    Thanks but the formula wont work because your example has the numbers in separate columns. Each asset number I have is in a single cell eg. Cell A1 = 0123-456-789-001.

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Look up formula

    Hi

    A possible(As we have no sample of your workbook), maybe is this, using 2 helpers & hidden columns.

    In B1 and copy down.

    =MID(A,6,3)

    In C1 and copy down.

    =COUNTIF($B1:$B$10,B1)

    Then get your result, using this.

    =COUNTIF($C$1:$C$10,1)

    Is this, works for you?
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Forum Contributor SCLai's Avatar
    Join Date
    08-18-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    129

    Re: Look up formula

    If you don't mind adding an extra column, you can use this to obtain the Building Number, then use DILIPandey's array formula to count no. of unique entries.
    Given data is in A1:
    =MID(A1,SEARCH("-",A1,1)+1,SEARCH("-",A1,SEARCH("-",A1,1)+1)-SEARCH("-",A1,1)-1)

    Hope this helps!

    SC
    Do give a * (bottom left) if the post helped!

  6. #6
    Registered User
    Join Date
    06-01-2012
    Location
    Canberra, Australia
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Look up formula

    Thankyou Fotis, this appears to work but due to the size of my spreadsheet (3500 entries) I was hoping there is a way to achieve this with maybe one formula?

+ 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