+ Reply to Thread
Results 1 to 9 of 9

Part of the data in a cell, plus work out an average.

  1. #1
    Registered User
    Join Date
    06-24-2015
    Location
    Manchester
    MS-Off Ver
    2010
    Posts
    76

    Post Part of the data in a cell, plus work out an average.

    Hi Guys
    I have attached a file.

    I need a few things on this and I have tried but not had luck.

    So the Post Code.
    I need in column C a formula so that it pulls the first part of the post code up to the space. I did do a simple formula of =LEFT(A2,4) but on an odd post code there is 2 characters a space and then it pulls the first part of the next part.

    For this next bit I tried a concatenate but it didnt work right for me. On the column D I need it to look at the result in column C and the add ", UK". So for example, if the original postcode is AB1 3EG in Column A, I want it to show AB1 in column C, and in column D, AB1, UK.

    In addition to this, I need something that looks at a single result, probably best to use column C as there will be duplicates, and work out the average lead time for that particular postal area.
    So for example, if AB1 is a result 4 times, and on each one of them the Lead Time is 10, 15, 20, 25, I need to see the average of that.
    Basically I want a list of all postcodes not showing duplicates but giving what the average lead time is.

    Sorry ha. I tried to explain this best as possible

    As always, many thanks for your help

    Thanks

    Nath'
    Attached Files Attached Files

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Part of the data in a cell, plus work out an average.

    If I understand your requirement, for starters, try in C2 copied down...

    =LEFT(SUBSTITUTE(A2," ",""),4)

    Then in D2 copied down...

    =C2&" UK"

    You could then build a pivot table off of the four columns

    Row Labels >> 3rd column (whatever you title it)
    Values >> Average of Lead Time
    Attached Files Attached Files
    HTH
    Regards, Jeff

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Part of the data in a cell, plus work out an average.

    If you want a formula solution

    In F2 copied down

    =LOOKUP(REPT("Z",255),CHOOSE({1;2},"",INDEX($C$2:$C$501,MATCH(TRUE,INDEX(ISNA(MATCH($C$2:$C$501,$F$1:$F1,0)),0),0))))

    In G2 copied down

    =AVERAGEIF(C:C,F2,B:B)

  4. #4
    Registered User
    Join Date
    06-24-2015
    Location
    Manchester
    MS-Off Ver
    2010
    Posts
    76

    Re: Part of the data in a cell, plus work out an average.

    The =LEFT(SUBSTITUTE(A2," ",""),4) brings in the 4th character of the post code.
    So if the Post Code is AB1 4EG, it leaves me with AB14, all I want is the first set of characters before the space.
    UK post codes are like : B1 3GE, B12 3EG, BE12, 3GE, BE1 3GE. SO I need the first set before the first space but that can be 2, 3 or 4 characters.

    Sorry, I hope im explaining it clear.

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Part of the data in a cell, plus work out an average.

    Okay, sorry, I see now...

    =LEFT(A2,FIND(" ",A2)-1)

    Haven't live in the UK since 1977...

  6. #6
    Registered User
    Join Date
    06-24-2015
    Location
    Manchester
    MS-Off Ver
    2010
    Posts
    76

    Re: Part of the data in a cell, plus work out an average.

    Fantastic! Thank you so much jeffreybrown. That works perfect.

    Thanks

    Nath'

  7. #7
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Part of the data in a cell, plus work out an average.

    So happy to hear you have what you need now. Please do drop back by if you need anything else.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  8. #8
    Registered User
    Join Date
    06-24-2015
    Location
    Manchester
    MS-Off Ver
    2010
    Posts
    76

    Re: Part of the data in a cell, plus work out an average.

    All done

    Thanks again

  9. #9
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Part of the data in a cell, plus work out an average.

    You're welcome and thx for the rep

+ 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. Average of a part of the data
    By breve93 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-04-2013, 11:58 AM
  2. Match part of cell to a list of words - Does not work with large data set
    By sdsu2010 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-01-2013, 06:41 PM
  3. [SOLVED] How do I work with part of a cell entry?
    By JKB in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  4. How do I work with part of a cell entry?
    By Bernie Deitrick in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-06-2005, 06:05 AM
  5. How do I work with part of a cell entry?
    By Bernie Deitrick in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-06-2005, 04:05 AM
  6. How do I work with part of a cell entry?
    By JKB in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  7. [SOLVED] How do I work with part of a cell entry?
    By JKB in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  8. How do I work with part of a cell entry?
    By JKB in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-29-2005, 07:05 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