If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
Count first and last characters
Hi,
you may try this For counting T or F =SUMPRODUCT(1*(LEFT(D317,1)={"T","F"})) For counting S or D =SUMPRODUCT(1*(RIGHT(D317,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 |
Thread Tools | |
Display Modes | |
|
|