If text conditions met in first empty row of Sheet A Col B then go to Sheet B specified column & row

Ironman

Well-known Member
Joined
Jan 31, 2004
Messages
1,069
Office Version
  1. 365
Platform
  1. Windows
Hi

I have this row of code
VBA Code:
If Cells(Target.Row, "B").Value = "OTHER (IB)" Or Cells(Target.Row, "B").Value = "OTHER (OB)" Or Cells(Target.Row, "B").Value = "OTHER (W)" Or Cells(Target.Row, "B").Value = "OTHER (T)" Or Cells(Target.Row, "B").Value = "REST" Or Cells(Target.Row, "B").Value = "" Then Exit Sub
Basically, what I'm looking for is a Worksheet_Change event that does this:

- After any value other than the above values is entered in Col B of the first empty row of Sheet 'Training Log' then

- I get a message box saying "Enter mileage in Daily Tracking Sheet" (I OK the message box) and then

- The active sheet is 'Daily Tracking' and the active cell is calculated in the following code:
VBA Code:
Dim Rowx As Variant
 Application.EnableEvents = False

 Rowx = Evaluate("=MATCH(MONTH(TODAY()),MONTH($A$1:$A$367),0)")
 If Rowx < 32 Then
   ActiveWindow.ScrollRow = 1
 Else
   ActiveWindow.ScrollRow = Rowx
 End If
Application.EnableEvents = True
Application.ScreenUpdating = True
Many thanks!
 
Last edited:

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Can the formula
Excel Formula:
=MATCH(MONTH(TODAY()),MONTH($A$1:$A$367),0)
be modified, so instead of locating the first day of the current month, it locates the first empty cell in the current month?
 
Upvote 0

Forum statistics

Threads
1,215,011
Messages
6,122,680
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top