# Finding specifically formatted variable within a string?

#### Erik the Awful

##### New Member
I have cells that typically end in 2 or 3 digits followed by a K, but on rare occasions they have text after the K. It is possible for a K to appear elsewhere in the cell. Is there a way to search for the pattern of ###K without macros? It is feasible to move the ##K to another adjacent cell, but that makes updating and reading the sheet more difficult, and I'm wanting to add the search to simplify the updating.

### Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Will this suffice?

=LEFT(A1,FIND("K",A1))

Will this suffice?

=LEFT(A1,FIND("K",A1))

I'm trying to add up the two (or three) digit numbers to the left of the K, but it is possible for there to be a K elsewhere I the cell. Unfortunately, the cells are formatted for presentation, not calculation.

Can you provide a sample of both, if it's always a number before the K, and a K can be afterward, then a simple modification of my formula would isolate the number:
=LEFT(A1,FIND("K",A1)-1)+0

A cell will typically contain "1000-1400 Alpha12 50K". Sometimes it might be "1000-1300 Alpha41 55K CFG" or it could be "1030-1500 Kilo23 60K". I'm trying to add up the numbers before the Ks.

Replies
3
Views
954
Replies
3
Views
397
Replies
10
Views
636
Replies
0
Views
733
Replies
0
Views
640

1,219,971
Messages
6,151,220
Members
451,017
Latest member
peterlam84

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

### Which adblocker are you using?

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

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