+ Reply to Thread
Results 1 to 8 of 8

Find data based on search criteria

  1. #1
    Registered User
    Join Date
    01-18-2015
    Location
    Tonbridge, Kent
    MS-Off Ver
    2013
    Posts
    3

    Unhappy Find data based on search criteria

    Hello!
    I need some help with finding the correct formula.
    I am trying to create a formula that will identify the horse population for a given postcode area. I've created a table with each UK postcode area, and the horse population for each of these. The horse population varies between 5 possibilities:
    0-25 horses per 10km2
    26-50 horses per 10km2
    51-75 horses per 10km2
    76-100 horses per 10km2
    101-130 horses per 10km2

    So my table looks like this (these are the first few lines:
    Postcode area Horses per 10km2
    AB 0-25
    AL 76-100
    B 51-75
    BA 51-75
    BB 26-50
    BD 26-50
    BH 51-75
    BL 76-100
    BN 76-100
    BR 0-25
    BS 51-75
    CA 0-25
    CB 101-130
    CF 51-75
    CH 0-25
    CM 26-50
    CO 26-50

    I need a cell where I enter the postcode letters and it lets me know which one of the horse population density it is. Does that make sense? Sorry I am rubbish at explaining! I was told to use an IF function but I'm not sure how to use an IF function for so many possibilities?

    Thanks for your help!

    Moderatro's note: I have changed your tite for you For future reference, please consider using titles that describe your problem
    Last edited by FDibbins; 01-18-2015 at 04:29 PM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Excel newbie and do not know what formula to use...

    VLookup will do the job for you.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    09-18-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    35

    Re: Excel newbie and do not know what formula to use...

    This would also do the job:
    Please Login or Register  to view this content.
    where B2:B100 is supposedly your range of the horse population, A2:A100 the postal codes that goes with all these horse populations, and cell C1 where you put in the postal code you want to look up.

    More info here: http://fiveminutelessons.com/learn-m...nstead-vlookup

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Excel newbie and do not know what formula to use...

    Hi, welcome to the forum

    Maybe this...
    A
    B
    C
    1
    AB 0-25 ab
    2
    AL 76-100 0-25
    3
    B 51-75
    4
    BA 51-75
    5
    BB 26-50
    6
    BD 26-50
    7
    BH 51-75
    8
    BL 76-100
    9
    BN 76-100
    10
    BR 0-25
    11
    BS 51-75
    12
    CA 0-25
    13
    CB 101-130
    14
    CF 51-75
    15
    CH 0-25
    16
    CM 26-50
    17
    CO 26-50


    C1=search criteria
    C2=IFERROR(VLOOKUP(C1,$A$1:$B$17,2,0),"Post Code Not Found")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    01-18-2015
    Location
    Tonbridge, Kent
    MS-Off Ver
    2013
    Posts
    3

    Re: Find data based on search criteria

    Thank you so much for the replies :-) I've got it working with VLookup but I will now try and get it working with your other options too!

    Thanks so much for your help I was stuck on it for hours and just couldn't get my head around it!

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Find data based on search criteria

    Thanks for the reply.

    Glad I could help.

    You can add rep(utation)point to the one's who helped you, by clicking on the star on the left side.

  7. #7
    Registered User
    Join Date
    01-18-2015
    Location
    Tonbridge, Kent
    MS-Off Ver
    2013
    Posts
    3

    Re: Find data based on search criteria

    Hello, it is me again! I'm stuck again...
    Now I've got the horse population in relation to each postcode sorted, I wonder if there is a way of influencing other cells depending on what the horse population is... Again, not sure if this makes sense.
    I'm creating a cash flow for a future livery yard so basically I'd like the horse population of the area to affect how many horses come to the establishment per month so the more horses in the area, the quicker the establishment fills up.

    I wondered if there was a way to do it so that the horse uptake each month varies by itself (within a value I've set) depending on the horse population in the area.

    That was a mouthful! Any one know what I am trying to say? :-)

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Find data based on search criteria

    How about sharing an excel file, without confidential information?

    Please add also the desired (expected) result.

+ 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. Excel Newbie - Need help on a formula - Thank you!
    By tirk82 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-15-2014, 12:28 AM
  2. Excel Newbie needs Formula for 3 Column addition & total.
    By Xegony42 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-24-2012, 12:25 PM
  3. COUNTIF & SUMIF formula question (excel/forum newbie)
    By RichardBewick in forum Excel General
    Replies: 7
    Last Post: 10-30-2008, 01:33 PM
  4. Newbie needs help on excel formula
    By abc99 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-03-2006, 08:32 AM
  5. need help with formula for a newbie excel guy
    By ben803 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 06-06-2006, 10:20 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