ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   program carriage return (https://www.excelbanter.com/excel-discussion-misc-queries/174093-program-carriage-return.html)

MarkM[_2_]

program carriage return
 

I have a situation wherein I have 2 columns of identifiers in columns A & B.
I'm scanning bar codes into columns C & D. What I would like to have happen
is that after I scan into column D for focus to go to the next row, column C.
But when I leave column C, I want to go to column D (which it currently
does).

Right now, I have to press the Enter key after scanning into columns C & D,
but I have hundreds of rows that I'm scanning, and it would be a lot easier
(and efficient) to not have to continually go back to the keyboard and just
use the scan gun. I looked at trying to program the scan gun, but could not
figure out a way to get the desired functionality.

I am not familiar with macro programming, so that may be my ultimate
solution, but I was hoping for a simple formula that I could use to help me
out here.

Thanks,

Mark

Bernard Liengme

program carriage return
 
If I select A1:B10 and then type into A1,then press tab we move to B1
I enter something in B1 and press tab and we move to A2
and so on....
Looks like what you want
best wishes

--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"MarkM" wrote in message
...

I have a situation wherein I have 2 columns of identifiers in columns A &
B.
I'm scanning bar codes into columns C & D. What I would like to have
happen
is that after I scan into column D for focus to go to the next row, column
C.
But when I leave column C, I want to go to column D (which it currently
does).

Right now, I have to press the Enter key after scanning into columns C &
D,
but I have hundreds of rows that I'm scanning, and it would be a lot
easier
(and efficient) to not have to continually go back to the keyboard and
just
use the scan gun. I looked at trying to program the scan gun, but could
not
figure out a way to get the desired functionality.

I am not familiar with macro programming, so that may be my ultimate
solution, but I was hoping for a simple formula that I could use to help
me
out here.

Thanks,

Mark




Stefi

program carriage return
 
Try this event sub:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 4 Then
Range("C" & Target.Row + 1).Select
Else
If Target.Column = 3 Then
Range("D" & Target.Row).Select
End If
End If
End Sub

To install it:

Right click on worksheet in VBA Project explorer window, choose View code
and copy sub into the worksheet code window!

Regards,
Stefi


€˛MarkM€¯ ezt Ć*rta:


I have a situation wherein I have 2 columns of identifiers in columns A & B.
I'm scanning bar codes into columns C & D. What I would like to have happen
is that after I scan into column D for focus to go to the next row, column C.
But when I leave column C, I want to go to column D (which it currently
does).

Right now, I have to press the Enter key after scanning into columns C & D,
but I have hundreds of rows that I'm scanning, and it would be a lot easier
(and efficient) to not have to continually go back to the keyboard and just
use the scan gun. I looked at trying to program the scan gun, but could not
figure out a way to get the desired functionality.

I am not familiar with macro programming, so that may be my ultimate
solution, but I was hoping for a simple formula that I could use to help me
out here.

Thanks,

Mark


Stefi

program carriage return
 
Hi Bernard,
I think that Mark wants to avoid any key pressing while holding a scanner in
his hand!
Stefi


€˛Bernard Liengme€¯ ezt Ć*rta:

If I select A1:B10 and then type into A1,then press tab we move to B1
I enter something in B1 and press tab and we move to A2
and so on....
Looks like what you want
best wishes

--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"MarkM" wrote in message
...

I have a situation wherein I have 2 columns of identifiers in columns A &
B.
I'm scanning bar codes into columns C & D. What I would like to have
happen
is that after I scan into column D for focus to go to the next row, column
C.
But when I leave column C, I want to go to column D (which it currently
does).

Right now, I have to press the Enter key after scanning into columns C &
D,
but I have hundreds of rows that I'm scanning, and it would be a lot
easier
(and efficient) to not have to continually go back to the keyboard and
just
use the scan gun. I looked at trying to program the scan gun, but could
not
figure out a way to get the desired functionality.

I am not familiar with macro programming, so that may be my ultimate
solution, but I was hoping for a simple formula that I could use to help
me
out here.

Thanks,

Mark






All times are GMT +1. The time now is 03:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com