farmerscott
Well-known Member
- Joined
- Jan 26, 2013
- Messages
- 819
- Office Version
- 365
- Platform
- Windows
Hi Everybody,
I have a simple problem but it exceeds my VBA skills.
I have a list of alpha numeric numbers, such as those below
SP2/1
SP2/2
.....
SP2/100
....
SP2/1000
Sometimes to the left of the "/", changes but not often so it is not an issue at the moment. I am interested in the numbers to the right 1-1000.
As part of data entry, the numbers 1-1000 come to me in a random sequence, and hence if done mannually a lot of scrolling within the worksheet. I want a quick and easy code that will find the relavent number (within the alpha numeric number) and then offset 1 column to the right so I can enter the data. Sometimes there might be more than 1 piece of information so we might need to offset by 2, 3 or 4 columns.
I am happy to use either an input box/s or use cells in row 1 to input values.
The following code is from a recorded macro. It does what I want, except I want "85" as a cell reference so it dynamically changes when data is entered in say "B1".
Cells.Find(What:="85", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
ActiveCell.Offset(0, 1).Activate
with thanks
FarmerScott
I have a simple problem but it exceeds my VBA skills.
I have a list of alpha numeric numbers, such as those below
SP2/1
SP2/2
.....
SP2/100
....
SP2/1000
Sometimes to the left of the "/", changes but not often so it is not an issue at the moment. I am interested in the numbers to the right 1-1000.
As part of data entry, the numbers 1-1000 come to me in a random sequence, and hence if done mannually a lot of scrolling within the worksheet. I want a quick and easy code that will find the relavent number (within the alpha numeric number) and then offset 1 column to the right so I can enter the data. Sometimes there might be more than 1 piece of information so we might need to offset by 2, 3 or 4 columns.
I am happy to use either an input box/s or use cells in row 1 to input values.
The following code is from a recorded macro. It does what I want, except I want "85" as a cell reference so it dynamically changes when data is entered in say "B1".
Cells.Find(What:="85", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
ActiveCell.Offset(0, 1).Activate
with thanks
FarmerScott