Help with Macro to Find based on cell Change

largeselection

Active Member
Joined
Aug 4, 2008
Messages
358
Hi,

I've done a little bit with macros that run on changes within a cell (checkmarks and such).

I'm trying to have one that basically executes a find based on the cell value that changes. As it stands now I have a sheet conditionally formatted so that when I put in an ID number in cell B17 it will highlight the entire row where the value in B17 is equal to the value in the cell in column A.

What I'd ultimately like to have happen is for it to execute a find and "jump" to that location. So I'd like to be able to type in ID# 1 into B17 and then have it automatically jump to that row (which will be highlighted yellow).

Sorry if this is confusing please let me know if you have any questions! THANKS!
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
This should get you started, right click the ws tab and pate this code in;
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Cells.Find(What:=Range("B17").Value, After:=ActiveCell, LookIn:=xlFormulas).Activate
End Sub

Cheers
Colin
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,356
Members
449,080
Latest member
Armadillos

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