text if negative value

C

Coco212

How do I write a function to subtract one row/column cell from one other
row/column cell, comparative by location, such as the cell on the same row
but the column before it?
or after it?
then change the cell color?
and font color?
then tell to "use another cell " if the value is a negative number?

Something like,
=if (same row, column to the left)-(same row, column two columns over to the
left)"greater than" (ten or more greater than) then turn cell dark red and
turn font white,
and
=if (same row, column to the left)-(same row, column two columns over to
the left)"greater than" = < "zero" enter text "Use cell in (threes columns
to the left, same row)
Thanks,
Syndy
 
M

Mike H

Hi,

This is a bit confusing but try this in D1 and drag down as required. You
can then use conditional formatting on D1 to set the cell/font colour you
want depending on the result.

=IF(C1-B1<=0,A1,"")

Mike
 
J

Jacob Skaria

Do you mean a generic formula which works on any cell..

1.............................................................................................................
=if (same row, column to the left)-(same row, column two columns over to the
left)"greater than" (ten or more greater than) then turn cell dark red and
turn font white,

1. Select the column/range of cells
2. From menu Format>Conditional Formatting>
3. For Condition1>Select 'Formula Is' and enter the below formula

(all in one line)
=INDIRECT(ADDRESS(ROW(),COLUMN()-1))-INDIRECT(ADDRESS(ROW(),COLUMN()-2))>=10

4. Click Format Button>Pattern and select your color (say Red) and font White
5. Hit OK


2.............................................................................................................
=if (same row, column to the left)-(same row, column two columns over to
the left)"greater than" = < "zero" enter text "Use cell in (threes columns
to the left, same row)

(all in one line
=IF(INDIRECT(ADDRESS(ROW(),COLUMN()-1))-INDIRECT(ADDRESS(ROW(),COLUMN()-2))<1,"Use Cell in "&ADDRESS(ROW(),COLUMN()-2),"")


If this post helps click Yes
 

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