Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Norman Kong via OfficeKB.com
 
Posts: n/a
Default if cell starts with characters formula

Hi

I need to count cells in a column starting with certain characters. each
cell's data varies in length. I have tried with @countif( but does not work
if the cell contains other characters after the "prefix".
eg.

row 20 cell 5 apples
row 21 cell 5 apples red
row 22 cell 5 apples green
row 23 cell 5 plums green
row 23 cell 5 plums purple

totals required for apples = 3 (regardless of colour)
total required for plums = 2 (regardless of colour)

@countif(C20:c30,"plums") gives answer of 1 require answer of 2
@countif(C20:c30,"apples") gives answer of 1 require answer of 3

Thanking you in advance

Regards

Norman

--
Message posted via http://www.officekb.com
  #2   Report Post  
JulieD
 
Posts: n/a
Default

Hi Norman

use the COUNTIF function
e.g.
=COUNTIF(C20:C30,"*apples*")

Cheers
JulieD


"Norman Kong via OfficeKB.com" wrote in message
...
Hi

I need to count cells in a column starting with certain characters. each
cell's data varies in length. I have tried with @countif( but does not
work
if the cell contains other characters after the "prefix".
eg.

row 20 cell 5 apples
row 21 cell 5 apples red
row 22 cell 5 apples green
row 23 cell 5 plums green
row 23 cell 5 plums purple

totals required for apples = 3 (regardless of colour)
total required for plums = 2 (regardless of colour)

@countif(C20:c30,"plums") gives answer of 1 require answer of 2
@countif(C20:c30,"apples") gives answer of 1 require answer of 3

Thanking you in advance

Regards

Norman

--
Message posted via http://www.officekb.com



  #3   Report Post  
Norman Kong via OfficeKB.com
 
Posts: n/a
Default

It works !!!
Thanks

--
Message posted via http://www.officekb.com
  #4   Report Post  
JulieD
 
Posts: n/a
Default

you're welcome - thanks for the feedback

"Norman Kong via OfficeKB.com" wrote in message
...
It works !!!
Thanks

--
Message posted via http://www.officekb.com



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
Can a Formula in Cell X modify Cell Y? alMandragor Excel Discussion (Misc queries) 7 February 10th 05 09:51 PM
How do I fix a formula in a cell? Kev Nurse Excel Discussion (Misc queries) 4 January 31st 05 07:25 PM
How do I prevent incorrect formula results appearing in cell? Marc Todd Excel Worksheet Functions 2 January 26th 05 07:57 AM
Formula to return cell contents based on multiple conditions Bill Excel Worksheet Functions 3 January 19th 05 09:59 AM
How do you copy a cell formula down a column without displaying n. Coddie Excel Worksheet Functions 4 January 18th 05 02:31 PM


All times are GMT +1. The time now is 11:47 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"