Hi forum,

I have some code that is run by pressing a command button after some data is pasted into a worksheet and I want the code to first confirm that the correct data has been pasted into the three columns that my main code uses (the source data is provided by another department and they often change the positions of columns).
I have been working through an Excel 2010 VBA book to try to work this out for myself but haven’t found an example similar enough to help me.
The code I need is (very, very roughly) something like this:

If A1.Value<> “Actual Date”,
MsgBox “Column A should contain Actual Dates”
If B1.Value<> “Forecast Date”,
MsgBox “Column B should contain Forecast Dates”
If C1.Value<> “Comments”,
MsgBox “Column C should contain comments”
Using the first statement as an example, if A1 contains the text “Actual Date” the code moves to the next If, then, if all OK, my main code runs.
If the text in cell A1 is anything other than “Actual Date” the message is displayed and the code aborted (giving the operator the opportunity to correct the problem).
Can someone please correct my very rough code above to code that will run as required?
Any assistance would be very much appreciated.

Thanks very much