I am pretty sure this is very easy and i found a code that did this sorta thing on this website. BUT...what it did was it focuses only on one cell, while i need it to check the whole column or at least a range of cells within a column. lets say column B and if a cell value in column B falls within a certain parameter i need to have a message box pop up.
For example. if a cell in column B OR a range of cells lets say "B1:B22" equals 25, I want a message box to pop up that says "limit reached".
Plus heres the script i found... it works as a charm for a single cell but not like i want it to.
Please advice i know its a matter a simple code tweaking. Thanks!
Code: (http://www.mrexcel.com/forum/excel-questions/98992-if-cell-value-equals-0-pop-up-message.html)
Option ExplicitPrivate Sub Worksheet_Calculate()Dim Rng1 As RangeDim Value As DoubleDim Prompt As StringDim Title As String 'Put the range you want to look at here Set Rng1 = Range("B12") 'Put the target value here Value = 0 'Put the message (prompt) of the message box (pop up) here Prompt = "Congratulations, You Balance!!" 'Put the title of the message box (pop up) here Title = "Balance" If Rng1.Value = Value Then MsgBox Prompt, vbInformation, Title End IfEnd Sub
For example. if a cell in column B OR a range of cells lets say "B1:B22" equals 25, I want a message box to pop up that says "limit reached".
Plus heres the script i found... it works as a charm for a single cell but not like i want it to.
Please advice i know its a matter a simple code tweaking. Thanks!
Code: (http://www.mrexcel.com/forum/excel-questions/98992-if-cell-value-equals-0-pop-up-message.html)
Option ExplicitPrivate Sub Worksheet_Calculate()Dim Rng1 As RangeDim Value As DoubleDim Prompt As StringDim Title As String 'Put the range you want to look at here Set Rng1 = Range("B12") 'Put the target value here Value = 0 'Put the message (prompt) of the message box (pop up) here Prompt = "Congratulations, You Balance!!" 'Put the title of the message box (pop up) here Title = "Balance" If Rng1.Value = Value Then MsgBox Prompt, vbInformation, Title End IfEnd Sub
Last edited: