Advance to New Cell After Previous Entry

Phil Hageman

New Member
Joined
May 6, 2014
Messages
14
Posting expenses in two ranges: V5:Y54 and AB5:AB53.

For range V5:Y54 - when a value is entered in cell Y5 (the last cell in the row), I need the cursor/active cell to move to V6 (the start of the next row down in the range). Likewise, when a value is entered in Y6 I need the cursor to move to cell V7. This repeats until a value is posted in Y53, where the cursor moves to cell V54.

For range AB5:AEY53 - when a value is entered in cell AE5 (the last cell in the row), I need the cursor/active cell to move to AB6 (the start of the next row down in the range). Likewise, when a value is entered in AE6 I need the cursor to move to cell AB7. This repeats until a value is posted in AE53, where the cursor moves to cell AB54.

How can this be accomplished? Macro?
 

ParamRay

Well-known Member
Joined
Aug 6, 2014
Messages
1,195
.
.

Try the following event-handler procedure, which should be placed in the code module corresponding to that particular worksheet:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)

    With Target
        If .Row >= 5 And .Row <= 54 Then
            Select Case .Column
                Case Is = 22, 23, 24, 28, 29, 30: .Offset(0, 1).Select
                Case Is = 25, 31: .Offset(1, -3).Select
            End Select
        End If
    End With

End Sub
 

Phil Hageman

New Member
Joined
May 6, 2014
Messages
14
Gpeacock,

Works exactly as needed - thanks for your time creating this solution. Apologize for the typos in my first post - ranges are V5:Y54 and AB5:AE54.

R/Phil
 
Last edited:

Forum statistics

Threads
1,082,017
Messages
5,362,695
Members
400,686
Latest member
Aakash

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top