Forumla

D

Don

Here is my question:
How do I write a forumla for (-) a number in a cell?
It should look somthing like this: If(P10="-",-N10,N10)

How do i get this to work?

Thank you.
Don
 
F

FSt1

hi,
Not entirely sure what you are asking but try this
note:assuming that formula will be in N10 otherwize it will not work.
formulas return values, they cannot perform actions.

=IF(P10<0,P10,P10*-1)

IF this is not what your are after, post back with more info.

Regards
FSt1
 
H

Harlan Grove

Don wrote...
Here is my question:
How do I write a forumla for (-) a number in a cell?
It should look somthing like this: If(P10="-",-N10,N10)

How do i get this to work?

Unclear. By "for (-) a number in a cell" do you mean changing the sign
of a number in that cell? If so, you can't do this with formulas. You'd
need VBA to write Change and Calculate event handlers to change the
sign of the number in cell N10 in place when P10 evaluates equal to
"-".

If you mean something else, what do you mean?
 
D

Don

Sorry if in not clear let me try this again.
Where the negative sign is:

5 -
6 -
7 -
8 -

After the formula it should look like this : If(P10="-",-N10,N10)
-5
-6
-7
-8
in the cell. Here is the forumla i was trying:
 
Top