What VB Code do I need

S

SG

Excel 2000

I have a sheet I enter lots of data from check books into. I have many
Columns and at the end of each Coolum I have a Sum in each cell to check
that the data was entered correctly.

Example:

A1 I would enter ($45.00)
R1 I would enter $45.00
In X1 if there is no difference you see the - symbol so I know I entered
the two numbers correctly. X1 is set up so I know the two numbers match and
I didn't enter $45.00 in one row and $44.00 in the other.

After this sheet fills up a bit it takes to much time to scroll down to
check all these entries. Is there a code I could enter that would display a
message box telling me X1 had a value other than -. In other words if X1 is
greater than 0 (zero) I need to know right then so I can make the change as
I go.

All the best,
SG
 
J

JG

You could put a conditional format on the page based on the value in
column X so that if the value in a particular row is <> 0, the row will
turn a color, like red. Just a suggestion to avoid VB if you wanted to.
 
D

davesexcel

SG said:
Excel 2000


A1 I would enter ($45.00)
R1 I would enter $45.00
In X1 if there is no difference you see the - symbol so I know
entered
the two numbers correctly. X1 is set up so I know the two numbers matc

All the best,
SG
=if(a1+r1=0,"-",a1+r1
 
D

davesexcel

davesexcel said:
=if(a1+r1=0,"-",a1+r1)

assuming A1 is a negative value


sorry, I read the message without realizing you wanted a VBA code, but
the function will work just as well
 
S

SG

I don't think the function will work as I need a message box because the
column that shows any difference may extend waaaaaay to the right of sight
:>)

The columns and rows after awhile fill beyond the page site and to work
around this I use the Data Form which works great but I need a message box
telling me if Column X or what ever Column my sum is in is different than
Zero.

Example Column:
Column X has the following.......
=SUM(C2:W2)

C2 always has a negative number
The next number could be anywhere between C3-W2 and if I enter anything but
what's in C2, X2 will show me the difference. I need something to alert me
the difference if any.

Thanks for your help....

All the best,
SG
 

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