# Need function in formula to only look at first 2 letters

#### Jgilmore

##### New Member
Hey All,

I am looking for a way to insert a function into this formula that will look at the first two letters in ('NCE NCW CDP Forecast'!D:D) part of the formula. The formula itself is correct, but it isn't pulling all of the information because some information in row D:D has more then 2 letters and this formula has to point to 2 letters only to work with the other sheets. E8 in this formula is what D:D is looking for hence, the reason to only see first 2 letters

Thanks for any help you can give.

=SUMIFS('NCE NCW CDP Forecast'!W:W,'NCE NCW CDP Forecast'!C:C,E7,'NCE NCW CDP Forecast'!D:D,E8,'kW Room'!I:I,"kw")/1000

### Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

#### Andrew Poulsom

##### MrExcel MVP
Welcome to MrExcel.

You could try changing E8 to E8&"*".

#### barry houdini

##### MrExcel MVP
Hello Jgilmore, welcome to MrExcel

So E8 contains 2 letters and for that condition you want to include all entries in 'NCE NCW CDP Forecast'!D:D that start with those 2 letters? Try using a wildcard like this:

=SUMIFS('NCE NCW CDP Forecast'!W:W,'NCE NCW CDP Forecast'!C:C,E7,'NCE NCW CDP Forecast'!D:D,E8&"*",'kW Room'!I:I,"kw")/1000

#### Jgilmore

##### New Member
Thanks Andrew, that worked. When I tried LEFT function it didn't seem to work as well.

#### Jgilmore

##### New Member
Thanks for welcome Barry and yes that worked well for this formula. It worked on looking for the last letters as well.

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,164,669
Messages
5,838,685
Members
430,563
Latest member
Raeyven

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