Performing math function with cells containing numbers & text

meighkee

New Member
Joined
Sep 3, 2008
Messages
43
Greetings,

I need some help. Am perform basic multiplication between two cells, one containing numbers & text.

Example -
Cell A1 - contains the number 5
Cell A2 - contains the words "5 days"
Cell A3 - I'd like to multiply A1 times A2 and come up with 25.

The word "days" in A2 is creating an issue. There must be a way for Excel to see only the number 5 in A2, and perform the multiplication formula accordingly.

Am hoping someone can help.

Thank you.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Is that the Only possible format for your Text strings, "For # Days" ?
If not, please show a few samples of All possibilities.
I also need to know if there may be more than 1 number within the Text string, like "For # Days and # Months"

Yes, that is the only format for my text string. It will always be "For # Days". There will only be a number once in the string, as per my example. The number of days, of course, won't always be 5. Could be 10, 12, 20, etc.
 
Upvote 0
M
N
O
P
19
5 day(s)​
5​
25​
=M19*N19
20
25 day(s)​
10​
2.5​
=M20/N20

column M custom format: 0 "day(s)"
then type number in M column
 
Last edited:
Upvote 0
Yes, that is the only format for my text string. It will always be "For # Days". There will only be a number once in the string, as per my example. The number of days, of course, won't always be 5. Could be 10, 12, 20, etc.


Book1
ABC
1555
2For 5 daysFor 16 daysFor 363 days
325801815
Sheet577
Cell Formulas
RangeFormula
A3=MID(A2,5,LEN(A2)-9)*A1
 
Upvote 0
Thanks very much jtakw. Can you explain the formula for me as I need to make some minor adjustments to cell numbers, etc.

Thanks again.
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,824
Members
449,050
Latest member
Bradel

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