• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Automatically check formula result

DaveCon

New Member
Hi,


I was hoping someone could help me, essentially i have a couple of scroll bars to flex certain numbers and I would like to have it so that a message box pops up when the sum of the flexed numbers matches the target, the sheet is set up as below


Target

Flex 1

Flex 2

Flex 3

Total (sum of flex 1, 2 and 3) <- message box to pop up when this cell equals the value in the target cell


Any insight into how to do this would be appreciated


Thanks in advance
 
Why not just apply conditional formatting to the Total Cell


A Conditional Formatting formula like

=Sum(Flex1, Flex 2, Flex 3)=Target

and set the Cell background as Green


Should do your job


To Learn about Conditional formatting, Have a look at:

http://chandoo.org/wp/2009/03/13/excel-conditional-formatting-basics/


Alternatively you will need to add some VBA
 
Thanks for the reply Hui,


I've already added in conditional formatting to do as you've suggested however the numbers being dealt with are typically in the hundreds of thouands and while I have the incrementation set to 1,000 it still requires to go by ones at times to get to the exact number so was looking to halt the user when the matching point has been reached to prevent them overshooting it as a consequence of just holding down in the scroll bar, then having to go back, and undershooting it etc etc and so have been searching for VBA that will achieve this
 
That can be done.

The problem will be that VBA won't kicking until you release the Scroll Bar control, so you may well have overshot it already
 
Thanks Hui,


From what you;ve said about not kicking in until releasing the scroll bar it would appear i'll just have to stick with the conditional formating or think of something. Thanks for taking the time to respond
 
Back
Top