Need Formulas

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Counting the appearance of text "OE" in column C could be done with:

Code:
=(LEN(C2)-LEN(SUBSTITUTE(C2,"OE","")))/2

Similarly, counting the text "LH" in column E with:

Code:
=(LEN(E2)-LEN(SUBSTITUTE(E2,"LH","")))/2

and fill both down as needed.
 
Upvote 0
Counting the appearance of text "OE" in column C could be done with:

Code:
=(LEN(C2)-LEN(SUBSTITUTE(C2,"OE","")))/2

Similarly, counting the text "LH" in column E with:

Code:
=(LEN(E2)-LEN(SUBSTITUTE(E2,"LH","")))/2

and fill both down as needed.

Returns only a 2 not the 3/2
 
Upvote 0
What's the meaning of the 3? for OOEOE ? I assume 2 is the number of OE's.

If not, you'll have to explain the meaning of the digits in 3/2, etc. because your original statement was count the OEs.
 
Last edited:
Upvote 0
AH, maybe you meant count the Os and count the Es???

Code:
=LEN(C2)-LEN(SUBSTITUTE(C2,"O",""))&"/"&LEN(C2)-LEN(SUBSTITUTE(C2,"E",""))

and

Code:
=LEN(E2)-LEN(SUBSTITUTE(E2,"H",""))&"/"&LEN(E2)-LEN(SUBSTITUTE(E2,"L",""))

BTW: are the numbers in column B ALWAYS 5-digit numbers??

If they're always 5-digits, I have ONE method, but it requires some helper columns.

W2 filled down: =TEXT(B2,"00000")
X2 filled down and across to AB: =1*(MID($W2,COLUMN()-(COLUMN($X2)- 1),1))
AC2 filled down and across to AG: =SMALL($X2:$AB2,COLUMN()-28)
And, finally AH2 filled down: =TEXTJOIN("",,AC2:AG2)

OR, you can adjust to another cell range (e.g., column G) and use my AH formula above in that range.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,843
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top