View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Copying data based on a condition

Venturing an alternative interp ..

Assume source data in Sheet1, cols A to F from row1 down
where col F = names
(names listed may not be unique, may appear multiple times in col F)

Then in another sheet, if a single name will be input in A1
Put in B1:
=IF($A$1="","",IF($A$1=Sheet1!F1,ROW(),""))

Put in C1:
=IF(ROW()COUNT($B:$B),"",INDEX(Sheet1!A:A,MATCH(S MALL($B:$B,ROW()),$B:$B,0)))

Copy C1 across to G1. Then select B1:G1, copy down to cover the max expected
extent of data in Sheet1. Hide away col B. Cols C to G will return all lines
from Sheet1 corresponding to the name input in A1, neatly bunched at the top.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"aheintz57" wrote:
I need to have excel automatically copy data based on a name

Example

User Data1 Data2 Data3 Data4 Name

So if a name is equal to "me" I need it to copy the entire line (information
from user to data4).