Formula Question: Return a Value if a Cell Contains a Letter within a Text String

Studk22

New Member
Joined
May 28, 2010
Messages
16
Hi,

I have a cells drawing information from a table. In this table I have model numbers to depict products in one column. In another column I have sales totals for those model numbers. I would like to sum the sales for those model numbers if the model number contains an S.

Conveniently, these model numbers will always have the letter S at the end of the text string so I have been using this formula to try to sum the sales:

=SUMIFS(Sheet1!AQ10:AQ29991,(Right(Sheet1!D10:D29991,1)),"S")

However on future formulas I will need to sum sales based on other possible letters which will not always come last in the model number.

Even when I tried to do a trial formula to figure out the answer the following would not work:

A1 = 22

=IF(RIGHT(A1,1)=2,"Yes","No")

This returned the answer "No" which is incorrect.

Ideas?
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Forum statistics

Threads
1,224,828
Messages
6,181,217
Members
453,024
Latest member
Wingit77

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