ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   many rows for 1 ref#, need to extract 1st row only for 1 ref# (https://www.excelbanter.com/excel-discussion-misc-queries/78027-many-rows-1-ref-need-extract-1st-row-only-1-ref.html)

J LI

many rows for 1 ref#, need to extract 1st row only for 1 ref#
 
Hi there,

I can't figure out the formula to extract the following problem:

Col A Col B Col C
Ref# Amount$ Description
123 $100 - This is the 1st line of ref# 123
123 $100 - This is the 2nd line of ref# 123
123 $100 - This is the 3rd line of ref# 123
456 $949 - This is the 1st line of ref# 456
456 $949 - This is the 2nd line of ref# 456
456 $949 - This is the 3rd line of ref# 456

I only need to extract the very first line in the column "Description" for
every separate "Ref#". I have about 13,000 rows of reference, but I only
need the first line for each Reference #.

I tried vlookup but it doesn't work.

Please help, and thanks.

Daniel CHEN

many rows for 1 ref#, need to extract 1st row only for 1 ref#
 
Use match and index functions:

= index(C1:C99,match("123",A1:A99,0))

--
Best regards,
---
Yongjun CHEN
=================================
XLDataSoft - Data Analysis Expert, Excel/VBA Specialist
- - - - www.XLDataSoft.com - - - -
Free Excel-Based Data Processing Tool is Available for Download
=================================

"J LI" <J wrote in message
...
Hi there,

I can't figure out the formula to extract the following problem:

Col A Col B Col C
Ref# Amount$ Description
123 $100 - This is the 1st line of ref# 123
123 $100 - This is the 2nd line of ref# 123
123 $100 - This is the 3rd line of ref# 123
456 $949 - This is the 1st line of ref# 456
456 $949 - This is the 2nd line of ref# 456
456 $949 - This is the 3rd line of ref# 456

I only need to extract the very first line in the column "Description" for
every separate "Ref#". I have about 13,000 rows of reference, but I only
need the first line for each Reference #.

I tried vlookup but it doesn't work.

Please help, and thanks.





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

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