closing tag is in template navbar
timefactors watches



TZ-UK Fundraiser
Results 1 to 14 of 14

Thread: MS Excel Advice Req

  1. #1
    Master
    Join Date
    Jul 2014
    Location
    UK
    Posts
    1,454

    MS Excel Advice Req

    Before the laptop heads for the window could anyone offer some advice on what is probably a simple Excel problem?

    I thought the Vlookup function was the answer to my prayers but it appears not. In simple terms what I've got so far in column A are shelf numbers, the next columns have different hand tools which can be found on that particular shelf etc.

    Now the bit I'm struggling with, what I want to do is create a function so I type in say "hammer" in one cell and in the next it will tell me which shelf it's on.

    I thought I was onto a winner with Vlookup but it appears the search logic is arse about face.

    Why did I volunteer for this.......

    Thanks

  2. #2
    Master
    Join Date
    Jan 2008
    Location
    Riyadh, KSA
    Posts
    5,518
    You look up the first column and tell it how many columns to go accross. In this case you have the columns the wrong way round.

    Switch description to column A and shelf number to column B.

    =VLOOKUP(Question cell,A1:B500,2,false)

    Your biggest problem is you would have to type the query in exactly as in list. e.g. Hammer - not hammer

    There are possibly a couple of other ways that may suit better.
    Last edited by Dazzler; 19th September 2017 at 13:52.

  3. #3
    Master markc's Avatar
    Join Date
    Jul 2003
    Location
    Edinburgh - directing IT stuff
    Posts
    3,832
    Quote Originally Posted by Dazzler View Post
    You look up the first column and tell it how many columns to go accross. In this case you have the columns the wrong way round.

    Switch description to column A and shelf number to column B.

    =VLOOKUP(Question cell,A1:B500,2,false)

    Your biggest problem is you would have to type the query in exactly as in list. e.g. Hammer - not hammer

    There are possibly a couple of other ways that may suit better.
    You could experiment with the final value being "TRUE" as opposed to "FALSE" as this will allow for the closest match to your query rather than an exact match.

    See here:

    https://support.office.com/en-gb/art...a-36c17e53f2ee

    Hope that helps

    Mark C

  4. #4
    Craftsman
    Join Date
    Jul 2017
    Location
    Reading UK
    Posts
    265
    The problem might the that you need to move the Tool column (which is the name of tool) to left. Also be careful about the $ signs in VLOOKUP otherwise it will screw if you drag the formula to the lower cells.

    Example:


  5. #5
    Master
    Join Date
    Jan 2008
    Location
    Riyadh, KSA
    Posts
    5,518
    I have a couple of better ways to do it.

    On balance I would add a filter to your columns and then use the search box to find all instances of a hammer -it will then hide all relevant lines leaving you with just instances of hammer, claw hammer etc..

  6. #6
    Grand Master RustyBin5's Avatar
    Join Date
    Feb 2017
    Location
    Scotland central
    Posts
    13,209
    A database may be better than a spreadsheet for this task


    Sent from my iPhone using Tapatalk

  7. #7
    Master
    Join Date
    Jul 2014
    Location
    UK
    Posts
    1,454
    Thanks for all the advice so far, by swapping the columns around I have it working to a certain extent.

    What's complicating matters is that each row has many columns of data. So each shelf may have 15 different items split across the columns, the Vlookup only seems to let you search in the left most column.

    This is great if whatever I search for is in that column (left most) but if say screwdriver is in column C it's never found.

  8. #8
    Master
    Join Date
    Nov 2007
    Location
    Dublin, Ireland
    Posts
    5,049
    vlookup should work fine as long there is only one hammer on one shelf

    if you share your excel ill do it for you

  9. #9
    Not to disagree, but excel makes a very good basis for a database.

    Does the spreadsheet contain any sensitive or commercial information? If not send it over and I'd be happy to write some Visual Basic to do exactly what you want, then send it back. It's probably about an hours job and foc clearly!

  10. #10
    Craftsman
    Join Date
    Jul 2017
    Location
    Reading UK
    Posts
    265
    Have a look at here:
    https://exceljet.net/formula/get-add...-lookup-result

    I think it is similar to what you want do.

  11. #11
    Master
    Join Date
    Jan 2011
    Location
    Maidenhead-ish UK
    Posts
    1,515
    Quote Originally Posted by RustyBin5 View Post
    A database may be better than a spreadsheet for this task
    Maybe, but you know what they say, when the only tool you have is a hammer (or pliers).

  12. #12
    Craftsman
    Join Date
    Apr 2016
    Location
    United Kingdom
    Posts
    294
    Have a look at Index Match. Works in a similar manner to a vlookup, but is faster (probably not an issue for you) but also doesn't restrict you to having the columns in a particular order.
    http://www.randomwok.com/excel/how-to-use-index-match/

  13. #13
    VLOOKUP and HLOOKUP are great once you get your head around the non logical way it works, and it works 3-Dimensionally into other sheets on the same workbook and even across different spreadsheet files

  14. #14
    Journeyman
    Join Date
    Jun 2014
    Location
    North East England
    Posts
    232
    Quote Originally Posted by Pelicans View Post
    Have a look at Index Match. Works in a similar manner to a vlookup, but is faster (probably not an issue for you) but also doesn't restrict you to having the columns in a particular order.
    http://www.randomwok.com/excel/how-to-use-index-match/
    Agreed, using INDEX and MATCH is often a better solution that VLOOKUP once you've figured out how it works!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Do Not Sell My Personal Information