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

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
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
[Table="width:, class:head"][tr=bgcolor:#000000][th] [/th][th]
M
[/th][th]
N
[/th][th]
O
[/th][th]
P
[/th][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#000000]
19
[/td][td]
5 day(s)​
[/td][td]
5​
[/td][td]
25​
[/td][td]=M19*N19[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#000000]
20
[/td][td]
25 day(s)​
[/td][td]
10​
[/td][td]
2.5​
[/td][td]=M20/N20[/td][/tr]
[/table]


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,224,823
Messages
6,181,181
Members
453,021
Latest member
Justyna P

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