Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need help with loop


I have a worksheet with several thousand retail items listed wit
Description, Product Barcode, price, etc.

In cell J10, I want to scan in a barcode from a product. any product.

I then want to search the data to find a matching barcode and retur
the description and the price of that item. I have accomplished thi
by using the following formulas:

=VLOOKUP(J10,A2:C24890,2,FALSE) Returns description from column 2
and

=VLOOKUP(J10,A2:C24890,3,FALSE) Returns price from column 3.

Now I need for the cursor to automatically return to J10 so I can sca
in the next product barcode.

The scanner that I am using enters the 10 digit barcode number in th
cell where I have my cursor, then automatically goes to the cell to th
right. How do I set this up to return to the original cell (J10) to ge
ready for the next barcode.

Please help. I know that the answer is probably very obvious - I a
just looking over it

--
Lane
-----------------------------------------------------------------------
Lane4's Profile: http://www.excelforum.com/member.php...fo&userid=2817
View this thread: http://www.excelforum.com/showthread.php?threadid=47702

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Need help with loop

right click on the sheet name and choose view code
paste this on the sheet code page

if k10 is selected, it should take you back to j10


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count = 1 Then
If Not Intersect(Target, Range("K10")) Is Nothing Then
Worksheets(1).Range("J10").Select
End If
End If
End Sub

--


Gary


"Lane4" wrote in
message ...

I have a worksheet with several thousand retail items listed with
Description, Product Barcode, price, etc.

In cell J10, I want to scan in a barcode from a product. any product.

I then want to search the data to find a matching barcode and return
the description and the price of that item. I have accomplished this
by using the following formulas:

=VLOOKUP(J10,A2:C24890,2,FALSE) Returns description from column 2
and

=VLOOKUP(J10,A2:C24890,3,FALSE) Returns price from column 3.

Now I need for the cursor to automatically return to J10 so I can scan
in the next product barcode.

The scanner that I am using enters the 10 digit barcode number in the
cell where I have my cursor, then automatically goes to the cell to the
right. How do I set this up to return to the original cell (J10) to get
ready for the next barcode.

Please help. I know that the answer is probably very obvious - I am
just looking over it.


--
Lane4
------------------------------------------------------------------------
Lane4's Profile:
http://www.excelforum.com/member.php...o&userid=28173
View this thread: http://www.excelforum.com/showthread...hreadid=477028



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Need help with loop

Tools=Options=Edit Tab
Uncheck "Move selection after Enter"



--
Regards,
Tom Ogilvy


"Lane4" wrote in
message ...

I have a worksheet with several thousand retail items listed with
Description, Product Barcode, price, etc.

In cell J10, I want to scan in a barcode from a product. any product.

I then want to search the data to find a matching barcode and return
the description and the price of that item. I have accomplished this
by using the following formulas:

=VLOOKUP(J10,A2:C24890,2,FALSE) Returns description from column 2
and

=VLOOKUP(J10,A2:C24890,3,FALSE) Returns price from column 3.

Now I need for the cursor to automatically return to J10 so I can scan
in the next product barcode.

The scanner that I am using enters the 10 digit barcode number in the
cell where I have my cursor, then automatically goes to the cell to the
right. How do I set this up to return to the original cell (J10) to get
ready for the next barcode.

Please help. I know that the answer is probably very obvious - I am
just looking over it.


--
Lane4
------------------------------------------------------------------------
Lane4's Profile:

http://www.excelforum.com/member.php...o&userid=28173
View this thread: http://www.excelforum.com/showthread...hreadid=477028



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Advancing outer Loop Based on criteria of inner loop ExcelMonkey Excel Programming 1 August 15th 05 05:23 PM
Loop Function unable to loop Junior728 Excel Programming 1 July 28th 05 10:23 AM
Problem adding charts using Do-Loop Until loop Chris Bromley[_2_] Excel Programming 2 May 23rd 05 01:31 PM
How do I create a For loop within a For loop? Linking to specific cells in pivot table Excel Programming 2 January 24th 05 08:05 AM
HELP!!!! Can't stop a loop (NOT an infinite loop) TBA[_2_] Excel Programming 3 December 14th 03 03:33 PM


All times are GMT +1. The time now is 02:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"