Capture Highest & Lowest Value

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
950
B2 gets updated by values due RTD
B3 I have kept a flag which becomes 1 for a certain time period (ONLY ONCE DURING A DAY)
Solution required:
B4=HIGHEST VALUE of B2 when B3=1 else 0
B5= LOWEST VALUE of B2 when B3=1 else 0
How to accomplish?
Thanks in adv
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
7,155
Office Version
2019
Platform
Windows
If I understand what you want correctly then this should do what you need.

First go to options in the excel File menu, on the Formulas tab check the box that says 'Enable iterative calculation' and click OK.

In B4, =IF(B3=1,IF(B4=0,B2,MIN(B4,B2)),0)
In B5, =IF(B3=1,IF(B4=0,B2,MAX(B4,B2)),0)
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
7,155
Office Version
2019
Platform
Windows
Don't think that the iterations will work correctly with vba.
 

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
950
I want precision & not going to make my Excel adjust with iteration
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
7,155
Office Version
2019
Platform
Windows
Have you tried it?

Using code (if it works) will not be any more precise.
 

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
950
I tried but couldn't find the correct answer so approached this site
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
7,155
Office Version
2019
Platform
Windows
I meant have you tried what I suggested?

That is more likely to work correctly than vba!
 

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
950
Someone can use helpful columns or rows to achieve the result. Note the flaf remains for 30 minutes sharp when started
 

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
950
Can someone give me code I can 'Put a cap' on the Max Value at 1000 & Minimum Value at 1
 

Forum statistics

Threads
1,082,360
Messages
5,364,927
Members
400,815
Latest member
Joaquin Phoenix

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top