View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
JLatham JLatham is offline
external usenet poster
 
Posts: 2,203
Default Need help extracting data

Well, somehow we need to be able to tell how many leading characters (digits)
to examine to match in the different sections of your database. Yes, at the
moment it is set on just matching 2 characters - best guess I could come up
with given your example data.

If there are columns where we can look to find the characters to remove or
an indicator of how many to examine remove, then we can probably move on with
this another step or two. I think after we have one or two more 'general
rules' in place, then I can probably turn you loose and you can work out
succeeding steps on your own. But if that turns out not to be the case, I'll
hang in there with you.

"A.S." wrote:

JLatham,
After looking at the example you had given, I think we are on the right
track. A question I wanted to ask was, the second check that it is doing, is
that based on number length? If so, then this will not work, since number
length varies. To explain, if we go back to the example of 50323113211, and
we search the second part for 23, 24, etc., the number length may be
different so it could be that the number is 5039113211 and it needs to find
the 9 which is in the database. I.e. the number lengths in the database vary.

"JLatham" wrote:

I worked up some formulas to strictly deal with the problem as I interpreted
it earlier. You can see the approach I took in this workbook:
http://www.jlathamsite.com/uploads/BreakItDown.xls
although I don't think that's going to be a practical solution for the
50,000 entry problem? I'm betting that there are going to be 40000+
combinations to deal with <g and that makes things really tough.

It's possible that a coding solution might work, but as Pete_UK has
accurately stated: more definition of how things work is really needed.

"Pete_UK" wrote:

I don't see what rules you are applying to get your derived numbers.
How do you know that 503 has to be removed (leaving 8 digits) or 1 in
your second example (leaving 6 digits)? You say "... in the next cell I
am told I need to pull the 1 ..." - who tells you?

Please try to describe your problem more accurately - what do you have
in terms of columns used and values in them and what do you want to
achieve from these values?

Pete

A. S. wrote:
I need to extract some data from a cell please let me know any suggestion you
may have for a formula.

Right now in a cell I have the number 50323113211. In a database I have...I
know that the number that needs to be extracted from this particular number
is 503. What formula can I use to extract this so that the 23113211 remains?
I have a list of 50,000 entries and the number varies. So in another cell i
may have 1342234 and in the next cell I am told I need to pull the 1 so that
the 343324 remains.

Now once the first part of this is done... I need from database range to
pull out the number it finds. So for example, let's say for the example of
23113211, there is a range in cells that has for example 23, 24, 25, 26. I
then need this range to be checked with the 23113211 and then pull out the
match. So in this case it finds that 23 is the match and then pulls it out
and leaves me with 113211. I know this is omplicated and confusing. Any
thoughts? Thanks.