Formula or conditional formatting?

simlark

New Member
Joined
Jul 12, 2011
Messages
3
Hi,

I have a need to use a formula which takes data from a series of drop down lists. The issue I have is that the drop down lists also contain text which renders the formula useless.

For example:

A1 APPLES Qty 10
B1 ORANGES Qty 20
C1 BANANAS Qty 30

The formula is simply, =product(A1,B1,C1) which should give a result of 6000. I can eliminate the text however that would require me to split the cells and have extra drop down lists which makes the sheet difficult to use.

Any thoughts,

Cheers, Scott
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi Scott

I'm almost hesitant to reply to this as I'm sure there must be a better way, but...

This would work for your needs as described providing that your quantities are always going to be no more that 99.

Code:
=PRODUCT(RIGHT(A1,2),RIGHT(A2,2),RIGHT(A3,2))
Or, this version will just take the last part of the cell value and use that as a number so it can be any amount.

Code:
=PRODUCT(RIGHT(A1,LEN(A1)-FIND("*",SUBSTITUTE(A1,"  ","*",LEN(A1)-LEN(SUBSTITUTE(A1,"  ",""))))),RIGHT(A2,LEN(A2)-FIND("*",SUBSTITUTE(A2,"  ","*",LEN(A2)-LEN(SUBSTITUTE(A2,"  ",""))))),RIGHT(A3,LEN(A3)-FIND("*",SUBSTITUTE(A3,"  ","*",LEN(A3)-LEN(SUBSTITUTE(A3," ",""))))))
HTH :)
 
Upvote 0
thanks for your reply. Tried it but seems too many arguements confuse the issue further, it confused me at least. I will revert to splitting the cells into sub lists to the text is not included in the formula.

Cheers
 
Upvote 0

Forum statistics

Threads
1,224,520
Messages
6,179,270
Members
452,902
Latest member
Knuddeluff

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