# Need Formulas

### Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

#### kweaver

##### Well-known Member
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.

#### CARBOB

##### Well-known Member
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

#### kweaver

##### Well-known Member
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:

#### kweaver

##### Well-known Member
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:

#### CARBOB

##### Well-known Member
Very well done thank you very much!!!

Replies
4
Views
57
Replies
1
Views
30
Replies
3
Views
28
Replies
7
Views
355
Replies
0
Views
51

1,130,281
Messages
5,641,303
Members
417,203
Latest member
cheesegeneman

### 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?

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