Including cell offset into known parameters.

handric

New Member
Joined
Feb 17, 2023
Messages
10
Office Version
  1. 2016
Platform
  1. Windows
Hi all.

Can you please help . I need to move from cell F56 BEFORE NEXT SET OF MEASUREMENTS.
The cell F56 is the last active cell where I am after finishing first set of measurements.


I tried this : If Range("K55").Value > 0 Then Range("F56").Offset(13, 1).Select based of the last entered value K55

but this dont work.

Please help.





Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
With Target

'declare condition to exit sub: single cell + value>0

If .Count > 1 Then Exit Sub
If Not IsNumeric(Target) Then Exit Sub
If .Value <= 0 Then Exit Sub
If .Row > 150 Then Exit Sub
' If do not want trigger change from row n (i.e, from row 10).
'If .Count > 1 Or Not IsNumeric(Target) Or .Value <= 0 Or .Row > 10 Then Exit Sub

Select Case .Column
Case 7, 9 'column F or H
.Offset(0, 2).Select
Case 11 'column I
.Offset(1, -4).Select
Case Else

Exit Sub
End Select


End With
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
I am not sure I understand what you are asking. Can you show us a sample of your data (removing/dummying up any sensitive data first), and walking us through an example of exactly what you are trying to accomplish?

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0

Forum statistics

Threads
1,214,981
Messages
6,122,566
Members
449,089
Latest member
Motoracer88

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