Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 173
Default Count first and last characters

Dear Expert,

I have got a file which have a system generated field below. (15 rows)
First character must be either "T", "F", "U".
Last character must be either "D", "S", "U".

How to write a function that can calculate how much "T" or "F" for the first
character under the series.
How to write a function that can calculate how much "D" or "S" for the last
character under the series.

TLD
TLD
FLD
TLD
TND
UU
TNS
TND
TNS
TMD
TMD
TLS
TMS
TLD
TMD

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Count first and last characters

Hi Elton

Try the below

=SUM(COUNTIF(A:A,{"T","F"}&"*"))
=SUM(COUNTIF(A:A,"*" & {"D","S"}))


--
Jacob (MVP - Excel)


"Elton Law" wrote:

Dear Expert,

I have got a file which have a system generated field below. (15 rows)
First character must be either "T", "F", "U".
Last character must be either "D", "S", "U".

How to write a function that can calculate how much "T" or "F" for the first
character under the series.
How to write a function that can calculate how much "D" or "S" for the last
character under the series.

TLD
TLD
FLD
TLD
TND
UU
TNS
TND
TNS
TMD
TMD
TLS
TMS
TLD
TMD

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 173
Default Count first and last characters

Thanks .... nothing can challenge you ....

"Jacob Skaria" wrote:

Hi Elton

Try the below

=SUM(COUNTIF(A:A,{"T","F"}&"*"))
=SUM(COUNTIF(A:A,"*" & {"D","S"}))


--
Jacob (MVP - Excel)


"Elton Law" wrote:

Dear Expert,

I have got a file which have a system generated field below. (15 rows)
First character must be either "T", "F", "U".
Last character must be either "D", "S", "U".

How to write a function that can calculate how much "T" or "F" for the first
character under the series.
How to write a function that can calculate how much "D" or "S" for the last
character under the series.

TLD
TLD
FLD
TLD
TND
UU
TNS
TND
TNS
TMD
TMD
TLS
TMS
TLD
TMD

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Count first and last characters

Hi,

you may try this

For counting T or F =SUMPRODUCT(1*(LEFT(D3:D17,1)={"T","F"}))
For counting S or D =SUMPRODUCT(1*(RIGHT(D3:D17,1)={"D","S"}))

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Elton Law" wrote in message
...
Dear Expert,

I have got a file which have a system generated field below. (15 rows)
First character must be either "T", "F", "U".
Last character must be either "D", "S", "U".

How to write a function that can calculate how much "T" or "F" for the
first
character under the series.
How to write a function that can calculate how much "D" or "S" for the
last
character under the series.

TLD
TLD
FLD
TLD
TND
UU
TNS
TND
TNS
TMD
TMD
TLS
TMS
TLD
TMD

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
How do I count the Characters in a cell Woozy Excel Discussion (Misc queries) 5 January 8th 09 08:26 AM
Count Characters in A Cell Daren Excel Discussion (Misc queries) 4 October 1st 08 02:34 PM
count characters Rich[_2_] Excel Discussion (Misc queries) 2 August 23rd 08 09:14 PM
count special characters Gaurav[_2_] Excel Worksheet Functions 3 April 17th 08 08:09 PM
Count Characters sjs Excel Worksheet Functions 6 December 9th 05 08:40 PM


All times are GMT +1. The time now is 07:14 AM.

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

About Us

"It's about Microsoft Excel"