ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Lookup (https://www.excelbanter.com/excel-worksheet-functions/224032-lookup.html)

[email protected]

Lookup
 
Hi,

I have worksheet with data as follows :

Col A Col B
ABC 123
ABC 234
ABC 345
AC 456
AC 567
AC 678

In Another Sheet I have
Col A
If the user inputs the ABC in cell A2 then
I need in Col D
123
234
345

I was using formula
=INDEX(Sheet1!$B$1:$B$10,SMALL(IF($A$2=Sheet1!$A$1 :$A$10,ROW(Sheet1!$A
$1:$A$10),""),ROW(1:1)),0)

I am looking for VBA solution.



All times are GMT +1. The time now is 04:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com