msgBox after update a cell

C

Claudio Silva

Hello,

I have a plan with hours

A B C D E
8 12 13 17 8h

Where, column A - Hour Arrived
column B - Lunch Out
column C - Lunch Back
column D - Hour Left (work)
column E - Sum of hours worked


Then

F G H
2 5 2

Where, colum F- Operation 1
colum G- Operation 2
colum H- Operation 3



I want to check the hours worked, and the and the hours distribuited on
Oper. I need a macro that check if the value is right. eg: 8 hours
worked (column E), than, sum column F,G,H and if the value is wrong
like In the example, i want a msgBox, warning the user. Is that
possible?
Remembering that it should be, various row

Waiting for your help!

Regards from Brazil..

Claudio Marques
 
C

Claudio Silva

Thanks a lot..

This is a solution!.
Now, i'm gonna create a macro that reads, if its´s wrong the msgBox
appears!

Thnks!
 
A

Andy Morton

I look for solutions that avoid VB.
Have you tried Excel's built-in Data validation ?
Its's in the Data menu.
Not difficult to understand.
It checks data entered in a cell to see if it's conforms to your criteria.
Not sure that it will work for what you need.

Andy
 
J

Jon Peltier

Better to use conditional formatting to highlight the errant cells, and put
something more descriptive than "wrong" in the indicator cell. Or put lots
of controls on your message box. I'd hate to have it pop up three times, as
I entered the first three of the four values included in the validation (and
I'd hate the programmer who inflicted it on me).

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


Thanks a lot..

This is a solution!.
Now, i'm gonna create a macro that reads, if its´s wrong the msgBox
appears!

Thnks!
 
C

Claudio Silva

Dear Andy,

In fact, i´m traying to use it..
But, without success..

I dont know exactly how to use this function with formulas
=(


Andy Morton wrote:
I look for solutions that avoid VB.
 
J

Jon Peltier

I don't think DV works in this scenario.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


Dear Andy,

In fact, i´m traying to use it..
But, without success..

I dont know exactly how to use this function with formulas
=(


Andy Morton wrote:
I look for solutions that avoid VB.
 
G

Gord Dibben

Selct F1:H1 and Format>CF>Formula is:

=SUM($F1:$H1)<>$E1

Format to a nice bright color.

Copy the formatting down as far as you wish.

Or swap around if you want E to be colored.


Gord Dibben MS Excel MVP
 
J

Jon Peltier

You still want a message box? You don't mind inconveniencing the users? Use
conditional formatting to highlight the cells that don't add up, and trust
the users to notice and fix them.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


Yes... it realy dont!

Still waiting for a solution...

¬¬

Claudio Marques
 
C

Claudio Silva

Hey Gord! Many thanks!
Now It works.. and like Jon Peltier said, it´s better a conditional
formatting than a msgBox...
Now it´s done!

Regards from Brasil!

Claudio Marques
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top