extract numbers from cell

zubair99

New Member
Joined
Aug 8, 2015
Messages
49
Hi,
I need to extract numirical numbers from the cells and move to it's next cell.

see need to extract data below

PICKLES (V.GF) PICKLED VEGETABLES & OLIVES 8
0.00
BATENGAN Bl FURN [V) OVEN-BAKED EGGPLANT AND FRESH TOMATOES SERVED WITH CHICKPEAS, CARAMELIZED ONION, MINT, CRUSHED GARLIC AND LEBANESE SPICES 17.5
0.00
HUMMUS WITH BREAD (V, GF) 9.5
0.00

<tbody>
</tbody>




I need this.

PICKLES (V.GF) PICKLED VEGETABLES & OLIVES8
BATENGAN Bl FURN [V) OVEN-BAKED EGGPLANT AND FRESH TOMATOES SERVED WITH CHICKPEAS, CARAMELIZED ONION, MINT, CRUSHED GARLIC AND LEBANESE SPICES 17.5
HUMMUS WITH BREAD (V, GF)9.5

<tbody>
</tbody>

Please replay asap thanks.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hi,
The objective is to find the first number.

=MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789"))
will give you the position of the first number

=LEFT(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789"))-1 will give you the text

=MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789")),LEN(A1)+1-MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789")
will give you the number

Hope it helps.
Puneet
 
Upvote 0
zubair99,

How about something like this?


Excel 2007
AB
1PICKLES (V.GF) PICKLED VEGETABLES & OLIVES 88
2BATENGAN Bl FURN [V) OVEN-BAKED EGGPLANT AND FRESH TOMATOES SERVED WITH CHICKPEAS, CARAMELIZED ONION, MINT, CRUSHED GARLIC AND LEBANESE SPICES 17.517.5
3HUMMUS WITH BREAD (V, GF) 9.59.5
Sheet1
Cell Formulas
RangeFormula
B1=MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789")),99)+0


The formula in cell B1, copied down:

=MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789")),99)+0
 
Upvote 0
I need this.

PICKLES (V.GF) PICKLED VEGETABLES & OLIVES8
BATENGAN Bl FURN [V) OVEN-BAKED EGGPLANT AND FRESH TOMATOES SERVED WITH CHICKPEAS, CARAMELIZED ONION, MINT, CRUSHED GARLIC AND LEBANESE SPICES 17.5
HUMMUS WITH BREAD (V, GF)9.5
Try these two formulas, copied down.
I've assumed, like your samples, the number you want is always at the end, and there are no other numbers in your data.

Excel Workbook
ABC
2PICKLES (V.GF) PICKLED VEGETABLES & OLIVES 8PICKLES (V.GF) PICKLED VEGETABLES & OLIVES8
3BATENGAN Bl FURN [V) OVEN-BAKED EGGPLANT AND FRESH TOMATOES SERVED WITH CHICKPEAS, CARAMELIZED ONION, MINT, CRUSHED GARLIC AND LEBANESE SPICES 17.5BATENGAN Bl FURN [V) OVEN-BAKED EGGPLANT AND FRESH TOMATOES SERVED WITH CHICKPEAS, CARAMELIZED ONION, MINT, CRUSHED GARLIC AND LEBANESE SPICES17.5
4HUMMUS WITH BREAD (V, GF) 9.5HUMMUS WITH BREAD (V, GF)9.5
Extract Number
 
Upvote 0
If that is not always true, then here is an alternative formula for column B.

Extract Number (2)

*ABC
2PICKLES (V.GF, 18% Sugar) PICKLED VEGETABLES & OLIVES 8PICKLES (V.GF, 18% Sugar) PICKLED VEGETABLES & OLIVES8

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:464px;"><col style="width:464px;"><col style="width:57px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
B2=LEFT(A2,FIND("ß",SUBSTITUTE(A2," ","ß",LEN(A2)-LEN(SUBSTITUTE(A2," ",""))))-1)
C2=RIGHT(SUBSTITUTE(A2," ",REPT(" ",100)),100)+0

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4

I have one more pattern need to extract this.



SANPELLEGRINO LIMONATA, ARAN Cl AT A ROSSA, CHINOTTO, MINERAL WATER (250ML) 4.5 MINERAL WATER (500ML) 7


0.00
TEA PEPPERMINT, EARL GREY, ENGLISH BREAKFAST, GREEN, CHAMOMILE, VANILLA CHAI 4
0.00
COFFEE 3.8/48

<tbody>
</tbody>

need it.

SANPELLEGRINO LIMONATA, ARAN Cl AT A ROSSA, CHINOTTO, MINERAL WATER (250ML) 4.5 MINERAL WATER (500ML) 77
TEA PEPPERMINT, EARL GREY, ENGLISH BREAKFAST, GREEN, CHAMOMILE, VANILLA CHAI 44
COFFEE 3.8/48
3.8/48

<tbody>
</tbody>
 
Upvote 0
I have one more pattern need to extract this.

need it.

SANPELLEGRINO LIMONATA, ARAN Cl AT A ROSSA, CHINOTTO, MINERAL WATER (250ML) 4.5 MINERAL WATER (500ML) 77
TEA PEPPERMINT, EARL GREY, ENGLISH BREAKFAST, GREEN, CHAMOMILE, VANILLA CHAI 44
COFFEE 3.8/48
3.8/48

<tbody>
</tbody>
You are no longer necessarily extracting a number from the end, as that last example is text, not a number.

Try
=TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",100)),100))
 
Last edited:
Upvote 0
zubair99,

Have you tried my other formula in my reply #3?

How about something like this?


Excel 2007
ABC
1SANPELLEGRINO LIMONATA, ARAN Cl AT A ROSSA, CHINOTTO, MINERAL WATER (250ML) 4.5 MINERAL WATER (500ML) 777
2TEA PEPPERMINT, EARL GREY, ENGLISH BREAKFAST, GREEN, CHAMOMILE, VANILLA CHAI 444
3COFFEE 3.8/483.8/483.8/48
4
Sheet1
Cell Formulas
RangeFormula
B1=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",LEN(A1))),LEN(A1)))
C1=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",300)),300))
 
Upvote 0

Forum statistics

Threads
1,215,549
Messages
6,125,473
Members
449,233
Latest member
Deardevil

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