"go to" Macro help please..

rudgeworks

New Member
Joined
Aug 22, 2008
Messages
3
I need to take the data from formula (a numeric value) and use this to automaticly move the cursor to a specific cell which is based on this result. IE in simple terms Formula (2*300) gives a result of 600, I need to then move to cell A600, if result is 150 then I need to move to cell A150.
Sounds so simple, but I have spent ages trying to do this... can anyone help?
(Excel 2007 if it makes a difference)
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
This certainly seems possible. Which cell contains the formula and what is the formula?
 
Upvote 0
The formula is =F22*100 and the result is shown in F23.

I tried recording a macro pasting the result (in F23) into the dialog in the "go to " tool, but that does not work, as the macro sets the result in stone and always gos to the same cell.
 
Upvote 0
Assuming that you are entering the value in F22 (i.e. F22 does not contain a formula) then try this. Right click the sheet tab, select View Code and paste in

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(False, False) = "F22" Then
    Application.Goto reference:=Range("A" & Range("F23").Value), scroll:=True
End If
End Sub

then close the code window using the X.
 
Upvote 0

Forum statistics

Threads
1,213,532
Messages
6,114,177
Members
448,554
Latest member
Gleisner2

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