Home > Forum Home > Automating Data Analysis Tasks > Look Up Share

Look Up

Excel Help for Look Up in Automating Data Analysis Tasks


Forum TopicPost Reply Login

Look Up

Rate this:
(3/5 from 1 vote)
ConfusedHi 

Basically I want to know how to view information from sheet 2 to sheet 1 with a help of a unique code.

For example when I enter code of person in sheet 1 then all the rows with the same UPI in sheet 2 should be displayed (there are multiple rows with the same code).

Thanks in advance.

Thanks & Regards
Geetika
 Posted by on
 
Replies - Displaying 1 to 3 of 3Order Replies By: Most Recent | Chronological | Highest Rated
Shocked
Rate this:
(3/5 from 1 vote)
A VLOOKUP function will only return 1 record from sheet 2.

The best method would be to use a Filter (from Data > Filter in the menu) to return all records with the required code from sheet 1.

To automate this, you could record a macro that filters sheet 2 with the desired code then selects visible cells only (Edit > Goto > Special > Visible Cells Only) then copies the results into sheet 1.  In the resulting code, you can then replace the filter value with the value of the code input cell range in sheet 1.
 Excel Business Forums Administrator
 Posted by on
Confused
Rate this:
(3/5 from 1 vote)
Hi Russell,

Thanks for your reply. I tried automating the same however i am getting a error.. basically it is not able to take the number entered in sheet 1.

If you could further help me in writing the macro that will great!

Thanks & Regards
Geetika

 Posted by on
Oops
Rate this:
(3/5 from 1 vote)
You could name the cell something like "lookval" then replace the lookup value in the VBA code with:

VBA Code:
Range("lookval").Value

 Excel Business Forums Administrator
 Posted by on
 Displaying page 1 of 1 

Find relevant Excel templates and add-ins for Look Up in the