Display records on different sheets using vlookup

justmine584

New Member
Joined
Apr 23, 2011
Messages
7
Hi,
I have a problem that i want to display searched record on different sheet. Below are the details.

-I have 2 sheets named sheet1 & sheet2
-Sheet1 contain records of students like Age,Name,marks etc

Age Name Marks
10 A 60
11 B 60
11 C 30
9 D 50
10 E 40

I want to display records search condition on Age. Means on sheet2 if user enter any age in A1 cell then search data from sheet1 should be displayed on sheet2 cells (starting from D4 to ...). Record should be displayed at any location where formula will set by user. Column titles also different on both sheets.



Please help me guys. I need urgent solution.
 
Last edited:
Nothing wrong with that file. You did that with Pivot Table. But requirement is that task should be done with Vlookup. Is VBA helpful for this?
 
Upvote 0

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Hi,

Well, I'm please that the file is Ok, but the vlookup (Hlookup, Lookup) issue is still the same, as far as I'm aware you cannot do it. On Sheet2 of the last file I posted, in cells B5:C5 I have copied the formula down to say 120 rows, this is the only way that I can think of for you to get the data you require using a formula.

I added a Pivot Table to Sheet2 to show you what a Pivot Table can do, if you use the filter at the top of the Pivot Table that will do exactly the same as the formula in B5:C120, but it doesn't take as long to calculate etc, also you can then create a Chart from the Pivot Table data if you wish or rearrange the data to give you different summary options.

I've made a few changes to Sheet2 to show you some more Pivot Table options, I strongly believe that the Pivot Table is the better option for you, but the formulas I have given you on Sheet2 also do as you require.

justmine584.xlsx


Hopefully someone else will read this thread and look at your file or mine and tell me that I'm totally wrong in my assessment of the capabilities of Vlookup or confirm that my solution(s) are the only way for you to get the desired result that you seek.

Good luck

Ak
 
Upvote 0
You did good work with pivot Table but requirement is that it should be done with vlookup. can it be done with vba? Is it possible.
 
Upvote 0
Hi,

I don't write or understand VBA, so I cannot help you with that. I suggest that you start a new thread asking for a "VBA alternative to Vlookup", and explain what you want the VBA code to do, but Vlookup is the wrong term to be using.

One last question, ignore the Pivot Table, what is wrong with using the formulas provided? Is this school work?

Ak
 
Upvote 0
Nothing wrong with that formula. Working fine. Anyways thanx for your efforts and give me alternative solutions. Thanx for you precious time.
 
Upvote 0
Hi,

Welcome to MrExcel.

Is this the type of data you have on Sheet1 and the result you expect on Sheet2?...


Excel Workbook
ABC
1AgeNameMark
210Bob80
312Tom65
411Jo55
510Joe75
611Jill80
711Bill50
812Tim60
912Jen55
1010Kim75
Sheet1



Excel Workbook
ABCD
1*AgeNameMark
2310Bob80
3**Joe75
4**Kim75
Sheet2


You can change the sheet name and cell references to suit, but you MUST enter the formula in C2 with ctrll-shift-enter not just enter. You can then copy the formula across and down as far as you require.

Good luck

Ak
Hi,
I am sorry to open this again, but I have a question related to the above formula. My situation is more or less similar with it.
I have to get the name of different employees involed in a project. I have used the above formula. However, it just gives the correct result for the first project, and totally wrong for the rest.
Could you please take a look at my excel sheet and suggest me a solution for it? Thank you in advance.
http://www.megaupload.com/?d=BKZNDC5J
 
Last edited:
Upvote 0
Hi nguyenthao_89

Have you used the correct cell references?
Have you entered the formula with ctrl-shift-enter.

Good luck.

Ak
 
Upvote 0
Hi nguyenthao_89

Have you used the correct cell references?
Have you entered the formula with ctrl-shift-enter.

Good luck.

Ak
Hi Ak,
I have used the correct cell references I believed! And I've entered formulas with ctrl-shift-enter as well. As i described above, the formulas do work for the first project, but it goes wrong for the rest. Could you please take a look at my file? Thanks alot alot alot :)
 
Upvote 0
Hi,

If I understand correctly what you are trying to do, then I think that you need to change some of your cell references.
Take a look here......

MrExcel help reply.xlsx

I don't think that the solution you are trying to use is the best way to do what you want. You may want to post a new question outlining what data you have and which data you want to return from it based on your varying criteria.

Good luck.

Ak
 
Upvote 0
Hi,

If I understand correctly what you are trying to do, then I think that you need to change some of your cell references.
Take a look here......

MrExcel help reply.xlsx

I don't think that the solution you are trying to use is the best way to do what you want. You may want to post a new question outlining what data you have and which data you want to return from it based on your varying criteria.

Good luck.
Ak

Hi Ak,
Thanks for your suggestion. I think it's a better idea to post a new threat :) Btw, I have tried ur advice about cell reference with my sheet but still didn't work well.
Hope you can take a look at my new post, here:
http://www.mrexcel.com/forum/showthread.php?p=2842137#post2842137

Thanks alot for your time :)

Jenny
 
Upvote 0

Forum statistics

Threads
1,225,156
Messages
6,183,238
Members
453,152
Latest member
ChrisMd

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