formula

  • Thread starter Thread starter Humbertt
  • Start date Start date
H

Humbertt

I'm trying to create a formula or a solution, when any
text or character is typed into a cell it will equal a set
value. Such as if cell A1 has a name then i will equal 2
and if cell B1 is blank it will equal 0. Hopefully,
someone can help me, thanks inadvance.
 
Right here. The formula evaluates from left to right.
Basically a condition is tested and if it is true,
perform a calculation or return a value. So:

=IF(test_condition,return_if_true,return_if_false)

is the basic construct. Our first test is to see if A1
contains any data (LEN returns the # of characters). So
if A1 contains more than 0 characters, it must mean there
is something in there. So it is TRUE. Because it is true,
the formula will return 2. But if it is not true, then
move on (return_if_false).

Instead of returning an actual value like 2 if the
statement is FALSE, we embed another if statement to test
B1. Same logic applies here. If B1 equals a zero text
string (nothing in the cell), then return 0.

If both statements fail, we must still return something
to the cell. In this case it is the string "Error."

You can embed up to 7 IF statments. Here's the correct
syntax for 1, 2, and 3 IF statements.

=IF(---,---,---)
=IF(---,---,IF(---,---,---))
=IF(---,---,IF(---,---,IF(---,---,---)))

There are also some other tricks, but this is basically
how it's done.

Jason
 

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

Similar Threads

Excel Need Countifs Formula Help 0
copy and paste the cell with formula ="1" 3
If condition with text 3
Finding Text within an Array 2
Simple Formula 23
Formula with blanks 5
A column will depend in B column 6
Which formula? 3

Back
Top