I have attached a sample file
The main sheet is sheet1
and the result required is shown in sheet2
feels like it should be a vlookup solution.
Tried but all in vain
If anyone can provide an appropriate solution
Thanks
Fraser
I have attached a sample file
The main sheet is sheet1
and the result required is shown in sheet2
feels like it should be a vlookup solution.
Tried but all in vain
If anyone can provide an appropriate solution
Thanks
Fraser
VLOOKUP or similar functions will not be that easy, beacause of irregular lengths.
May be try such simple macro:
PS. Please adhere to forum rules - already in the first one reads:![]()
Please Login or Register to view this content.
Your post title should describe your problem, not your anticipated solution.
Best Regards,
Kaper
Hello Kaper
What you have tried is perfect but sheet1 has a very huge
database and I do not want all the data to be converted to that form.
In sheet2 I will manually enter any one number in column A2 and it matches
with the number in sheet1 and puts up the data vertically as I have shown.
Now the data is till fifth row. Next time I will enter number manually in A6.
The details are till row 7 further I will enter number manually in A8.
I hope you have got this.
OR may be if there is a command button wherby after every number I enter
I should click the command button and the data gets transferred. Even that is
workable for me.
Thanks for trying and awaiting for your reply.
Fraser
Have a look if it suits you better?
or (if you want to have it copied to second sheet):![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Hi Kaper
I have checked the code but need to have some more
clarification. May be there is some mistake in
my explanation and your understanding.
I have attached the same file with some more data and the
result required in sheet2. Test2.xlsx
If you see sheet2 you will come to know that there is no
fix sequence of the numbers mentioned in column A.
From the database in sheet1 I can mention any number
in any sequence and only that details are placed vertically.
As I mentioned yesterday of clicking the command button evertime
you enter a number in column A in sheet2 might work.
From the database in sheet1 I have not mentioned all the numbers in sheet2
and also not in the sequence. In sheet2 I have mentioned only four numbers in
column A whose report or print I require.
Please let me know if it is clear to you
Again thanks for the effort and time you are giving
Fraser
The database in sheet1 has crossed 8000.
For every code number I will have to first go to sheet1 and
search for its row number and then enter the same in sheet2.
Fraser
The "engine" is all the time the same. I changed only way to start it. Now you just write a number in column A in Sheet2. Procedure searches first Sheet1 and identifies row with information requested. Further actions are the same as before.
The code is now in Sheet2 module (not in general purpose Module 1) as it is the handler of Worksheet_Change event
![]()
Please Login or Register to view this content.
That was exactly what I required and you made it much easier then I thought.
Thanks a lot and have a good time.
Fraser
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks