I have a spreadsheet with up to 2000 rows which I run each day to check for matching errors. All data is general (alpah number mix).
I compare in rows 1-2000 the col A number with the col C number and the col B number with the col D number.
I am running Excel 2003.
I do not know VB or scripting.
Col A and B are automatically populated by input from a data base with up to 2000 numbers in a new worksheet.
Col C and D are populated by hand scanner input.
After scanning in the row of data into col C then col D I need to automatically return to the next empty row in col C. My scanner allows me to go from row "X" col D one cell to the right to col E (tab) or one cell down in col D (return). So I need to go left one cell or down one cell and left two cells to get back to the next empty row in col C. My scanner does not allow further commands.
I am stuck in one of these two cells after entering data in row "X" col D.
Not a complicated process. However, I want to expedite the process.
I need a way to automatically return to the next empty row of col C without hitting a key so I can scan in the next rows data.
Entering in up to 2000 rows of data in col C and D takes a lot longer without the automation I am looking for.
I built a macro but it still requires a keyed entry. I think what I need is an automatic shift/tab to move left one cell from the col D I can end up in.
Is there a way to automate the "move" or "go to" to the next empty col C row?
Other info:
In col E I compare data in col A (each row 1 - 2000) with data in col C.
In col F I compare data in col B (each row 1 - 2000) with data in col D.
The formulas for col E and F are easy. Formulas are in rows 1-2000.
=IF(A1=C1,"","BAD")
=IF(B1=D1,"","BAD")
In G1 I count the number of "BAD" compares with: =COUNTIF(E1:E2000,"BAD")
In H1 I count the number of "BAD" compares with: =COUNTIF(F1:F2000,"BAD")
In I1 I sum G1:H1 for a total of "BAD" for the day.
Help appreciated, thanks.
Hello dgbillings,
Welcome to the Forum!
This macro runs whenever the data is changed in column "C" or "D". Once and entry is made into column "C", it moves to column "D" of the same row. Once an entry is made into column "D", it moves down 1 row to the cell in column "C".
Worksheet Event Macro Code
How to Save the Worksheet Event MacroPrivate Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("C:D")) Is Nothing Then With Target If .Column = 3 Then Cells(Rows.Count, .Column).End(xlUp).Offset(0, 1).Select If .Column = 4 Then Cells(Rows.Count, .Column).End(xlUp).Offset(1, -1).Select End With End If End Sub
1. Copy the macro using CTRL+C keys.
2. Open your Workbook and Right Click on the Worksheet's Name Tab for the Worksheet the macro will run on.
3. Left Click on View Code in the pop up menu.
4. Paste the macro code using CTRL+V
5. Save the macro in your Workbook using CTRL+S
Sincerely,
Leith Ross
Fantastic.
You have saved me many, many minutes a day.
Thank you very much.
Hello,
I am new to this site. I am trying to update my inventory using a scanner system. I am trying to delete old products and update new ones. I saved all the PLU info in the excel format. I want to automatically move left one column after data input by scanner.What I am trying to do is that when I scan the product's UPC code, it should find the product and go to next column where I can update the quantity, and then go to the next column where I can change the price. I worked wtih Excel before but I need help in this matter. I will be very thankful.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks