Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




385 posts

Ultimate Geek
+1 received by user: 29


Topic # 191385 2-Feb-2016 20:07
Send private message

Ok currently at work i have a spreadsheet that i need to enter certain products in each day once they are delivered

 

 

 

Currently

 

I have dropdown lists on the main page, linking to the second sheet

 

How it works

 

I select the Correct Supplier, and the next cell comes up with the product names (and nothing else) and I select the correct product name, and all the product details including b/code are displayed,

 

unfortunately a lot of products have the same name or very similar names and it is impossible to tell from the product name which is which, where there are two identical product names i often have to reselect the alternate choice to get the correct product  and b/code

 

Once all the days products are enetered I print the page

 

What I want

 

(as there is a b/code scanner attached to my computer)

 

Scan in the b/code press enter and the details come up, this should be simple, but as i have never made a spreadsheet unless i have been forced to, I can't figure out how to do this, the dropdown lists was right at the edge of my ability, but having a user input is throwing me completely, i can't seem to get the formulae to work.

 

Any help would be appreciated, Or a link to a coherent tutorial, my terminology is bad so i am probably looking for the wrong thing, I also have a pounding headache and backache after taking a tumble today so i am off to bed and hopefully this will make more sense in the morning

 

Notes

 

The product details are basically in a list like the below, (the supplier details aren't overly essential, i was planning to just add them in a third column of the product details to make the query easier)

 

 

 

Widget - 94000123456789

 

sprocket - 9400098765432

 

gadget - 9400045362718

 

 





'We love to buy books because we believe we’re buying the time to read them.' WARREN ZEVON


Create new topic
743 posts

Ultimate Geek
+1 received by user: 219

Subscriber

  Reply # 1483878 2-Feb-2016 20:13
2 people support this post
Send private message

IcI

554 posts

Ultimate Geek
+1 received by user: 125

Trusted

  Reply # 1483941 2-Feb-2016 21:38
3 people support this post
Send private message

For basic functionality, VLOOKUP() will do the trick.

 

Watch out for the following

 

     

  1. In your lookup table, the bar code value MUST be the left most value
  2. Sort your bar codes in ascending order
  3. In your VLOOKUP(), as the last parameter, specify that you want an exact match.
  4. Consider that you will NOT find your value. Thus use error correction: =IFERR(VLOOKUP(bla,blah,blah),"No bar code found")

 

Here is a nice tutorial from Excel Tactics to get you started.

 

If you have the stomach for it, rather use an INDEX-MATCH-MATCH formula as explained on the mbaexcel website. With INDEX-MATCH-MATCH your lookup value can be anywhere in the lookup array and you can return results horizontally or vertically. Very useful if you can't re-arrange your data to use only the left most column for lookup.

 

 

 

Edit - Let me know if you want more help.


 
 
 
 


1484 posts

Uber Geek
+1 received by user: 360


  Reply # 1484108 3-Feb-2016 09:04
Send private message

Out of interest, does the likes of MYOB support this?

Perhaps your existing software has an add-on inventory package



385 posts

Ultimate Geek
+1 received by user: 29


  Reply # 1484635 3-Feb-2016 17:59
Send private message

 Ok, this was the code i was using (I have a header row)

=VLOOKUP(A2,Sheet2!A1:B44,2,FALSE)

After having a read of the tutorials, I finally clicked what my problem was, i was using commas instead of semi colons, and my testing value was number 45 in my list and I had set my range to only 43 values

So the below sort of works

=VLOOKUP(A2;Sheet2!$A$1:$B$45;2;FALSE)

Obviously it doesn't handle missing values yet, but i am working on it (thanks for the code on that guys),





'We love to buy books because we believe we’re buying the time to read them.' WARREN ZEVON




385 posts

Ultimate Geek
+1 received by user: 29


  Reply # 1484664 3-Feb-2016 18:20
Send private message

Ok so code now works correctly

 

=IFERROR(VLOOKUP(A4;Sheet2!$A$1:$B$47;2;FALSE);"Barcode doesn't exist")

 

 

 

Next question, if I don't enter anything into the b/code field how do I stop it saying anything

 

My main page looks a bit like this now

 

eg

 

94000123456789 - Widget 

 

9400098765432 -sprocket

 

940004536271 - gadget

 

940004531945 - Barcode Invalid

 

   - Barcode Invalid

 

   - Barcode Invalid

 

   - Barcode Invalid

 

   - Barcode Invalid

 

   - Barcode Invalid

 

   - Barcode Invalid

 

 

 

There must be some sort of if input < 2 Chars display nothing

 

 

 

So would my code be something like this? obviously i am making up the function names, but you get where I am heading?

 

 

 

=IFERROR(VLOOKUP(A4;Sheet2!$A$1:$B$47;2;FALSE);(IF_LENGTH_INPT >2 then "Barcode doesn't exist" Else ""))

 

 





'We love to buy books because we believe we’re buying the time to read them.' WARREN ZEVON




385 posts

Ultimate Geek
+1 received by user: 29


  Reply # 1484711 3-Feb-2016 18:46
Send private message

Ok this seems to do everything

 

 

 

=IF(ISBLANK(A2);"";(IFERROR(VLOOKUP(A2;Sheet2!$A$1:$B$47;2;FALSE);"Barcode doesn't exist")))

 

 

 

Now all i have to do is do a big bit of testing, Please tell me if you see a glaring error in it





'We love to buy books because we believe we’re buying the time to read them.' WARREN ZEVON


IcI

554 posts

Ultimate Geek
+1 received by user: 125

Trusted

  Reply # 1484907 3-Feb-2016 23:56
Send private message

Morgenmuffel: Please tell me if you see a glaring error in it

 

Looking good.


3258 posts

Uber Geek
+1 received by user: 207

Trusted

  Reply # 1484912 4-Feb-2016 00:38
Send private message

IcI:

 

For basic functionality, VLOOKUP() will do the trick.

 

Watch out for the following

 

     

  1. In your lookup table, the bar code value MUST be the left most value
  2. Sort your bar codes in ascending order
  3. In your VLOOKUP(), as the last parameter, specify that you want an exact match.
  4. Consider that you will NOT find your value. Thus use error correction: =IFERR(VLOOKUP(bla,blah,blah),"No bar code found")

 

Here is a nice tutorial from Excel Tactics to get you started.

 

If you have the stomach for it, rather use an INDEX-MATCH-MATCH formula as explained on the mbaexcel website. With INDEX-MATCH-MATCH your lookup value can be anywhere in the lookup array and you can return results horizontally or vertically. Very useful if you can't re-arrange your data to use only the left most column for lookup.

 

 

 

Edit - Let me know if you want more help.

 

 

If you're using "Exact match" the records don't have to be in any specific order.


1484 posts

Uber Geek
+1 received by user: 360


  Reply # 1485147 4-Feb-2016 12:48
One person supports this post
Send private message

couple of tips when using vlookups:  sometimes when coping and pasting data into excel the data can be pasted as text or with spaces that will break the vlookup.  simple trick is to place the number 1 into any random cell, copy it, then select all the data and paste-special-multiply it.  Easier than copying, pasting special as values only, then cutting the data back to the original location.

 

don't forget to "F4" the table range


3258 posts

Uber Geek
+1 received by user: 207

Trusted

  Reply # 1485459 4-Feb-2016 21:50
Send private message

Plus I really encourage people to us INDEX-MATCH. It's much more useful, and not really any harder to get your head around.




385 posts

Ultimate Geek
+1 received by user: 29


  Reply # 1488295 9-Feb-2016 19:35
Send private message

Thanks all it is working fine for what I need now.

 

 

 

 





'We love to buy books because we believe we’re buying the time to read them.' WARREN ZEVON


Create new topic



Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

Spark doubles down on wireless broadband
Posted 24-Jan-2018 15:44


New Zealand's IT industry in 2018 and beyond
Posted 22-Jan-2018 12:50


Introducing your new workplace headache: Gen Z
Posted 22-Jan-2018 12:45


Jucy set to introduce electric campervan fleet
Posted 22-Jan-2018 12:41


Hawaiki cable system will be ready for service in June 2018
Posted 22-Jan-2018 12:32


New Zealand hits peak broadband data
Posted 18-Jan-2018 12:21


Amazon Echo devices coming to New Zealand early February 2018
Posted 18-Jan-2018 10:53


$3.74 million for new electric vehicles in New Zealand
Posted 17-Jan-2018 11:27


Nova 2i: Value, not excitement from Huawei
Posted 17-Jan-2018 09:02


Less news in Facebook News Feed revamp
Posted 15-Jan-2018 13:15


Australian Government contract awarded to Datacom Connect
Posted 11-Jan-2018 08:37


Why New Zealand needs a chief technology officer
Posted 6-Jan-2018 13:59


Amazon release Silk Browser and Firefox for Fire TV
Posted 21-Dec-2017 13:42


New Chief Technology Officer role created
Posted 19-Dec-2017 22:18


All I want for Christmas is a new EV
Posted 19-Dec-2017 19:54



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.