mithelesh New Member Jul 14, 2014 #1 Hi all Goodday !! Please suggest how to code using macro of using functions . i used , Text to columns option in Data tab in excel menu i got the seperation of plancodes . then how to count the number of plans as shown in excel sheet . Regards Mithelesh.S Attachments tocount.xlsx tocount.xlsx 9.4 KB · Views: 11
Hi all Goodday !! Please suggest how to code using macro of using functions . i used , Text to columns option in Data tab in excel menu i got the seperation of plancodes . then how to count the number of plans as shown in excel sheet . Regards Mithelesh.S
Deepak Excel Ninja Jul 14, 2014 #2 Pls check this!! =IF(ISERR(FIND(CHAR(10),A1)),IF(LEN(A1)=LEN(SUBSTITUTE(A1,",","")),LEN(A1)-LEN(SUBSTITUTE(A1,"/","")),LEN(A1)-LEN(SUBSTITUTE(A1,",",""))),LEN(A1)-LEN(SUBSTITUTE(A1,CHAR(10),"")))+1
Pls check this!! =IF(ISERR(FIND(CHAR(10),A1)),IF(LEN(A1)=LEN(SUBSTITUTE(A1,",","")),LEN(A1)-LEN(SUBSTITUTE(A1,"/","")),LEN(A1)-LEN(SUBSTITUTE(A1,",",""))),LEN(A1)-LEN(SUBSTITUTE(A1,CHAR(10),"")))+1
mithelesh New Member Jul 14, 2014 #3 I have another scenario Incell A1 , i have data as below : Incell A1 UXZAT072D UXZAT072DC UXZAT072DM UXZAT072E UXZAT072EC UXZAT072EM if I use the formula now i get the value as 1 . Please see the attached sheet . Thankyou Mithelesh.S Attachments tocount.xlsx tocount.xlsx 10 KB · Views: 4
I have another scenario Incell A1 , i have data as below : Incell A1 UXZAT072D UXZAT072DC UXZAT072DM UXZAT072E UXZAT072EC UXZAT072EM if I use the formula now i get the value as 1 . Please see the attached sheet . Thankyou Mithelesh.S
Faseeh Excel Ninja Jul 14, 2014 #4 This one also: Code: =IF(ISERROR(FIND(CHAR(10),A1)),1,SUM((MID(A1,ROW(A1:A999),1)=CHAR(10))*1)+1) Press Ctrl Shift Enter to run.
This one also: Code: =IF(ISERROR(FIND(CHAR(10),A1)),1,SUM((MID(A1,ROW(A1:A999),1)=CHAR(10))*1)+1) Press Ctrl Shift Enter to run.
mithelesh New Member Jul 14, 2014 #6 Hi Faseeh Used the same code, the count is 1 again . should we drag the formual or we need to use CTRL+SHIFT+ENTER Please suggest Mithelesh.S
Hi Faseeh Used the same code, the count is 1 again . should we drag the formual or we need to use CTRL+SHIFT+ENTER Please suggest Mithelesh.S
Deepak Excel Ninja Jul 14, 2014 #8 mithelesh said: I have another scenario ...... if I use the formula now i get the value as 1 . Please see the attached sheet . Thankyou Mithelesh.S Click to expand... this will work for all three cases. =IF(ISERR(FIND(CHAR(10),A1)),IF(LEN(A1)=LEN(SUBSTITUTE(A1,",","")),LEN(A1)-LEN(SUBSTITUTE(A1,"/","")),LEN(A1)-LEN(SUBSTITUTE(A1,",",""))),LEN(A1)-LEN(SUBSTITUTE(A1,CHAR(10),"")))+1
mithelesh said: I have another scenario ...... if I use the formula now i get the value as 1 . Please see the attached sheet . Thankyou Mithelesh.S Click to expand... this will work for all three cases. =IF(ISERR(FIND(CHAR(10),A1)),IF(LEN(A1)=LEN(SUBSTITUTE(A1,",","")),LEN(A1)-LEN(SUBSTITUTE(A1,"/","")),LEN(A1)-LEN(SUBSTITUTE(A1,",",""))),LEN(A1)-LEN(SUBSTITUTE(A1,CHAR(10),"")))+1
mithelesh New Member Jul 14, 2014 #9 Hi all Thanks you for the replies both of them are working well . ~Mithelesh.S