want if cell containts text, then increase count by one

L

lsundae

I want to have an If/Then statement that looks for text in a cell and then
increases a count by 1.

=If(B33="text"),("b40+1"), (""))

This is about what I have, but I want something that would read something
like:
If cell b33 contains this text, then add 1 to cell b40, if not then do
nothing.

Thanks,

Louise
 
M

Max

One way to play with ..

Click Tools > Options > Calculation tab

Check "Iteration"
Input a "1" in the "Max iterations" and "Max change" boxes

Click OK

Now put in B40: =IF(TRIM(B33)="text",B40+1,B40)

See also JE's notes and caveats at :
http://www.mcgimpsey.com/excel/accumulator.html

Look for:
- Single cell accumulator
- Worksheet Function Accumulator (using Circular References)
 
F

Frank Kabel

Hi
this is not really possible with formulas. you'll need VBA for this or a
helper cell
 

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