supersezzie
New Member
- Joined
- Feb 27, 2012
- Messages
- 2
Hi,
I'm new here so hello everyone! I'm hoping someone can help me...
I've got a spreadsheet set up that in one cell I needed to extract just the numerical data with no spaces or punctuation from a previous cell, which could also have text, spaces and punctuation.
I tried for hours and eventually found a formula online that I copied into the cell (I'll paste it at the bottom), which worked except for one problem: it omits the 0's if they are at the start of the number. It's really important that the 0's stay in.
For example:
SE0619 comes out as 619.
However, my next step is to split this number and look it up in a look up table so I would actually need to be looking up '06' as the code.
Can anyone understand this formula enough to tell me how to edit it to keep in the 0's as I don't think it's a straightforward formatting of the cell issue, I think it's something embedded in the formula?
Failing that, can anyone at least talk me through what the formula is doing so I can have a go at fixing it myself? Any help would be gratefully received (this is going to help a conservation charity so you'd be doing your bit...)!!!
Sezzie
Here is the formula:
=SUMPRODUCT(MID(0&A2,LARGE(INDEX(ISNUMBER(--MID(A2,Seq,1))*Seq,0),Seq)+1,1)*10^Seq/10)
Seq is defined as: =ROW(INDEX('Sheet1'!$1:$65536,1,1):INDEX('Sheet1'!$1:$65536,255,1))
I'm new here so hello everyone! I'm hoping someone can help me...
I've got a spreadsheet set up that in one cell I needed to extract just the numerical data with no spaces or punctuation from a previous cell, which could also have text, spaces and punctuation.
I tried for hours and eventually found a formula online that I copied into the cell (I'll paste it at the bottom), which worked except for one problem: it omits the 0's if they are at the start of the number. It's really important that the 0's stay in.
For example:
SE0619 comes out as 619.
However, my next step is to split this number and look it up in a look up table so I would actually need to be looking up '06' as the code.
Can anyone understand this formula enough to tell me how to edit it to keep in the 0's as I don't think it's a straightforward formatting of the cell issue, I think it's something embedded in the formula?
Failing that, can anyone at least talk me through what the formula is doing so I can have a go at fixing it myself? Any help would be gratefully received (this is going to help a conservation charity so you'd be doing your bit...)!!!
Sezzie
Here is the formula:
=SUMPRODUCT(MID(0&A2,LARGE(INDEX(ISNUMBER(--MID(A2,Seq,1))*Seq,0),Seq)+1,1)*10^Seq/10)
Seq is defined as: =ROW(INDEX('Sheet1'!$1:$65536,1,1):INDEX('Sheet1'!$1:$65536,255,1))