Highest High using VBA if statement

velocity1234

New Member
Joined
May 5, 2014
Messages
25
I have a real time feed and I am trying to have excel automatically record the highest high.

I have the following Named Ranges:

HH = Highest High
Last = Last price (which is constantly moving higher and lower

I want the code to always be running in the background.

This is what I have, but I am over my head here.

If Worksheets("sheet1").Range("Last").Value >= Worksheets("sheet1").Range("HH").Value Then Worksheets("sheet1").Range("HH").Value = Worksheets("sheet1").Range("Last").Value

Any help would be greatly appreciated.

Thanks
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
What causes the values in your named ranges to change?
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,854
Members
449,051
Latest member
excelquestion515

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