Link to home
Start Free TrialLog in
Avatar of ADRIANA P
ADRIANA PFlag for United States of America

asked on

need quey in any position

Have the data coulmn G every 13 rows

need to query an number in any position
example 510  =501 = 105=150=015=051

create the preview
with ocurrences like the eaxmple !!
topNUM3.xlsx
Avatar of Jacques Geday
Jacques Geday
Flag of Canada image

WOW !!!! Your a pro in explaining what you want .

What sheet are we talking about here ?
DATAP3
or
PRE-VIEW

Then
need to query an number in any position
 example 510  =501 = 105=150=015=051

Can you be more explicit ?
gowflow
Try this.

I wasn't sure about the range of the data you wanted to see in the output but I followed your example.

Column "G" contains some 4-digit numbers. Should I include them in the search?
29020057.xlsm
Avatar of ADRIANA P

ASKER

gowflow Thnks very Much for you help

What sheet are we talking about here ?
DATAP3
or
PRE-VIEW

Data is in DATAP3  colum G every 13 rows cell
User generated image
Then
need to query an number in any position
 example 510  =501 = 105=150=015=051

Can you be more explicit ?
gowflow


Yes i need to look for 5 1 0 in any combination  when the query look for
can be 501 or 105 or 150 or 015 or 051
they are like 6 combinations
Martin thanks very Much for you help

Try this.

I wasn't sure about the range of the data you wanted to see in the output but I followed your example.

Column "G" contains some 4-digit numbers. Should I include them in the search?

NOT  4 digit in JUST the position in every 13 rows as show in the pic
they are only 3 numbers every 13 rows
User generated image
Ok, I understand.

Another question: If you were looking for "637" for example, would it be useful to have a something like "Results for 637" in the heading on the PRE-VIEW worksheet?
Here is my solution.

1) This solution will ask for a number and will allow only a number of 3 digits to be input any alfa is rejected.
2) It will find all permutations of the number and when found it will scroll to it with a message box.
3) At the end you get a count of the combination found.
4) Item found are only the ones that are located at 13 spaces from the first occurrence. All other found are not advised of nor displayed.

Please check it and let me know.
gowflow
topNUM3-V01.xlsm
Martin

I have problms

i took the DATAP3 and duplicate just to run and test with more data in
and test with 510 numbers and still saying  it found in just 2 rows
when is suppose to be in 4 because I duplicate all the data (I copy all data and paste in the end so data is duplicate )

and create just 2 ocurrences in Preview and should be 4 at least

y send the sample to seee here

also

Another question: If you were looking for "637" for example, would it be useful to have a something like "Results for 637" in the heading on the PRE-VIEW worksheet?

Yes !!! Please  it will make more understanding

ideas like that help me a lot !!
Please do it
martin-datanum3top.xlsm
gowflow  Thnks great thinking and help too

in this case with the file you post to helpme!
why i get it ??
can be clear  it?? don't show up

i get some messages likeUser generated imageUser generated image
yes it is because you have links in the file you posted. let me clear them.
Here is the file please try it.

gowflow
topNUM3-V02.xlsm
gowflow
but this are good ideas i like !

User generated imageUser generated image
also i have to say  the  preview sheet was not create
why ? that very important
Sorry you did not ask for a preview sheet !!!! can you please explain
gowflow
Adriana, in the workbook I posted the are only two values that match 510 in column "G" on sheet DATAP3; 015 in row 737 and 510 in row 9.
gowflow

the query have to be for example  if i look for  510
have to be 501 or 015 or 051 or 105  or 150

all these combination have to be answer
I mean the 3 numbers in any positon
Martin !

initially was 2 but i duplicate if you scroll down you will see
is  more tha 2 instances i will need to see all the instances show up
Look at the workbook I posted and tell we the 4 row numbers.
gowflow  file clean thaks  but still need  the full query and preview
let me know  where you need i explain better
Martin  here i posted the file
after the duplicate so you can verify
please download
ID: 42119294
its ok can you please tell me if my logic is fine does it find the number like you want I will work on the preview that is no problem
gowflow
Martin here the file sorry my mistake !!
 y verify you rigth !
 
here waht i say

with the find are 4 times510
but also i need the 510 in any positiion
martin-datanum3top.xlsm
If you would just please look at workbook 29020057a.xlsm, you'll find just 2 matches. If you change for example range(G74) to 501 you'll get 3.

Si usted apenas mira el cuaderno de trabajo 29020057a.xlsm, usted encontrará apenas 2 fósforos. Si cambia por ejemplo rango (G74) a 501 obtendrá 3.
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Martin Where is it ??
gowflow

when i look for 510 it show one ocurrence

i duplicate the data and still show one ocurrence
Why
here the file please verify !

i need the number 510 in  any position
at least is at 2  but is more than that
topNUM3-V02--1-.xlsm
Look again. It's there now.
Martin !! test it look here
User generated image
this are are needed to be show too!!
and is not doing!
here it is with your preview.
Let me know

gowflow
topNUM3-V03.xlsm
You said to look in column G. The picture shows only one 015 in column "G".
Martin
i need all combination of the 3 numbers

User generated image
HOLD ON !!! what column are we to look for ORD or TOP ???
You pointed to Col G in the first pictures ! and it should be every 13 right ??

I am LOST !!! ... I have to learn Spanish .... :)
gowflow
gowflow  is doing better but find jus one ocurrences
i need all combination of the 3 numbers
I know! I was only responding to your picture. If you think there is a problem then tell me which row should be found that isn't.
And you never answered my question. Is the data you want to search in COLUMN G?
gowflow and Martin

I need look the G column after the first in every 13 rows is where i need to look
That is EXACTLY what my workbook does!
i need any combination of the 3 digit number
lets say
510 or 501 or 015 or 051 or 105 or 150
i need any combination of the 3 digit number
lets say
510 or 501 or 015 or 051 or 105 or 150
I know! That is EXACTLY what my workbook does!
Martin !
 your workbook show just 3 ocurrences and they are more
Martin we are ok Col G is fine. I think the problem is the data.

ADRIANA, please could post the workbook that you have that have all the data then we will both move our macro there and you can make the tests that you want as seems we are mixed with multiple data here.

gowflow
your workbook show just 3 ocurrences and they are more
Tell me where. Don't make me guess.
gowflow here is the file

The probelms is i need all instances of the number
MArtin you file is working good!
but i need get all the 510 combination possible
theses combination are 510
                                            501
                                             015
                                              051
                                               105
                                                150
these are all the possible combination that shoud be show
then create the preview of all the combinations
If i write 510 in the search

all the of  theses combination
                                            501
                                             015
                                              051
                                               105
                                                150
have to show up as answer
My code does find all combinations! And for the last time, If you don't agree then tell me the address of any cell that should be found but isn't.

Mi código encuentra todas las combinaciones! Y por última vez, si no está de acuerdo, entonces dígame la dirección de cualquier celda que se debe encontrar, pero no lo es.
these should be show in the pre-view sheet
these should be show in the pre-view sheet
They do.
Martin

here are some of them
this combinations with the addrees cel
was looking with the find tool

User generated image
Ok martin let write  be back
5 of them are in column "I" which is not what you asked for.
I am waiting to hear the end of story ... is it Col G or I also ?
gowflow
Martin You Rigth sorry !!

this is what i found with the find tool

510  =   g9

501  =  g74


105  =   not found

150  =   not found


015 = g737
gowflow   is just column G no other

but for create the preview i need the all colums  show !!
MArtin let me now duplicate the data so i can test
because i will add data to work  with
You don't have to duplicate the data in order to test it. Just change some of the values in column G.
Martin after i duplicate the date i took the same columns until the end and copy and
paste so it will make double

if now are 3 hits  should be  6 then

it still show 3 hits

im wrong ???

can you duplicate to test it ??
Adriana please check this file.

When it find a combination if not every 13 rows it will tell you but not take it to preview.
gowflow
topNUM3-V04.xlsm
ok but i need to add a lot of data  to works in more than 3000  but

if you say i trust on you
ok will wait till you post your full data and will check the macro
gowflow
We have exceeded 60 comments here. I wonder what the record is:)
Martin ! i duplicate to test lik the new data i will put on will be repeat too
ohhh don't worry .... I went far beyond 120 ...
gowflow
@ADRIANA
Please when you post the new data have in mind a set that you know the results and simply give us the number like 123 or whatever and will run it and see the combinations.

gowflow
Here it is. I noticed your data had some extra lines I put a formula that count every 13 row then reset in Col F then deleted the extra rows so now it find correct values.

Try 130 you will get 4
510 you will get 2

let me know if all ok
gowflow
topNUM3-V05.xlsm
Sorry but hv to go get some rest as here past 3:00 AM !!!!
will check on this tomorrow
gowflow
Here is a small improvement. The data in the PRE-VIEW headings is changed and now all the column widths in each occurrence match the column widths of columns B:G.
29020057c.xlsm
Looking Good Martin !
gowflow rest tomorrow is another day
great job ! working better !
Gentlemen Thank you!
for today ! help and time ! we keep looking to do better !
great job !
Great ! Job !!
Too bad I missed my solution for a simple resetting  formula address that was giving wrong results.
In any case that's the name of the game.

Here is my solution so you have 2 instead of 1.
gowflow
topNUM3-V06.xlsm