Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
lsundae
 
Posts: n/a
Default want if cell containts text, then increase count by one

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
  #2   Report Post  
Max
 
Posts: n/a
Default

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)
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"lsundae" wrote in message
...
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



  #3   Report Post  
Frank Kabel
 
Posts: n/a
Default

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

"lsundae" wrote:

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

  #4   Report Post  
R.VENKATARAMAN
 
Posts: n/a
Default

=IF(B33="text",B40+1,B40)


.. enter <text in B33 and 5 in B40
if this is so the cell where you enter the above will be 6
if this not so the cell will be 5
is this what you want

Frank Kabel wrote in message
...
Hi
this is not really possible with formulas. you'll need VBA for this or a
helper cell

"lsundae" wrote:

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



  #5   Report Post  
Max
 
Posts: n/a
Default

"Frank Kabel" wrote
....
this is not really possible with formulas.


Thought the example suggested earlier using a formula in *B40* itself
(with the iteration settings) seems to work ok under light testing ..
of course, within bounds of the caveats mentioned in JE's:
http://www.mcgimpsey.com/excel/accumulator.html
Worksheet Function Accumulator (using Circular References)

--
Rgds
Max
xl 97
--
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
---


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot view all of text in large cell, even though I have it to w. sydme Excel Discussion (Misc queries) 1 December 27th 04 03:26 PM
Hide text that doesn't fit in the cell Rene Excel Discussion (Misc queries) 1 December 16th 04 04:34 PM
how to hyperlink text to a cell steve New Users to Excel 1 December 14th 04 08:21 PM
Forcing text onto new line in cell Doug Poll New Users to Excel 2 December 3rd 04 12:09 PM
how to count the nr of occurrences of a text string in a cell rang eagerbuyer Excel Worksheet Functions 1 November 4th 04 12:27 PM


All times are GMT +1. The time now is 03:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"