Solved

# IF + Message box

Posted on 2011-02-16
178 Views
Hi,

Im looking for some code to say if cell H3 in tab "RC Check" = Check, Msg box "Check Accounts" Appears in Tab "Screen"

Maybe i could put it in a sub and call it at the end of my routine

Thanks
Seamus
0
Question by:Seamus2626
• 3
• 2

LVL 6

Expert Comment

do you need it to be VBA or not ?
well... if formulas are ok put in any cell of the sheet "Screen" where you want to see this result:

=IF('RC Check'!H3="Check","Check Account","")

now, if you need VBA code, let us know more details as what's triggering it, and if you want the result to show in a cell or in a messagebox, or in an external txt file, or ... well, you got my point :)

Thanks
0

Author Comment

Thanks Fernando, i need VBA, I will call it through a sub at the end of my report and a message box will be great.

Thanks
Seamus
0

LVL 6

Accepted Solution

FernandoFernandes earned 500 total points
ok then.. the VBA code to do so is:
``````if sheets("RC Check").Range("H3").value = "Check" then
MsgBox "Check Account",VbOkOnly+VbInformation,"Warning Message"
end if
``````
0

Author Closing Comment

Thank you FernandoFernandes!!
0

LVL 6

Expert Comment

:-)
0

## Featured Post

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…