Highest & Lowest

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,226
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
Z1=1 or 2 as soon as system time equals 'start time' & 'end time' respectively else Z1=0 (default)
During this "Time Period" when Z1 first becomes equal to 1 & finally when it becomes equal to 2;
C2:C200 & D2 D200 keeps on updating its values continuously.
Output required: in E2:E200 & F2:F200 which should be the highest value of respective cell address of C column & the lowest value of respective cell address of D column AS LONG AS Z1=1.
Ex:
For Z1=1
C2=200.22 D2=507.43 E2=200.22 F2=507.43
C2=201.34 D2=501.43 E2=201.34 F2=501.43
C2=204.75 D2=500.43 E2=204.75 F2=500.43
C2=204.75 D2=508.55 E2=204.75 F2=500.43
C2=203.89 D2=500.43 E2=204.75 F2=500.43
...
Answer is E2 & F2.
Similarly for other C3:C200 & D3:D200 answer would be in E3:E200 & F3:F200.
How to accomplish?
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
I am novice in macros. Andrew, please help me with a proper code.
 
Upvote 0
Sir, Appreciate once again..but finally today just now I had deleted that ws since I don't understand EXACTLY what is 'worksheet code event' & may be because of some silly error my Excel workbook was not working properly today & was causing enough problems in the broadband connectivity. After getting feedback for "Help needed for a macro" only; I would dare to re-insert the ws.

So, please try & understand my current situation & write the macros...would be grateful to you.
 
Upvote 0
Upvote 0
If you are uncomfortable writing and maintaining VBA code I think you should avoid it, especially if your are going to be using the workbook for your "bread & butter".
 
Upvote 0
I'll just say being very systematic & hard working, I CAN MAINTAIN the vba codes 'given to me' but I can't write. Using Excel for so many years I can VERY WELL MAINTAIN THE DRAFTED CODES & I had already created a huge Excel workbook which gives me my bread & butter but few more ws are needed with codes, drafting of which is not an easy task for me but I still say that I can maintain it very well. The code given by PETER SS is helping me extremely well & the result which I get in the cell(s) thr' codes are pre-thought for further defined action & results. So please help.
 
Upvote 0

Forum statistics

Threads
1,223,268
Messages
6,171,100
Members
452,379
Latest member
IainTru

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