Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Copying data based on a condition

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).

  #2   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 some thoughts ..

Assume source data in Sheet1, cols A to F from row1 down
where col F = names (names listed are assumed unique)

Then in another sheet, if the names are listed in A1 down
we could put in B1:
=IF(A1="","",INDEX(Sheet1!A:A,MATCH($A1,Sheet1!$F: $F,0)))
Copy B1 across to F1, then fill down to populate the required info from
Sheet1's cols A to E.
--
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).

  #3   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).

  #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).

  #5   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

Sorry, just detected, there's a slight correction to the earlier:
=IF(A1="","",INDEX(Sheet1!A:A,MATCH($A1,Sheet1!$F: $F,0)))


it should have read as:
=IF($A1="","",INDEX(Sheet1!A:A,MATCH($A1,Sheet1!$F :$F,0)))


(Missed the "$" for the front IF's $A1)

Anyway, guess my other suggestion -- the alternative interp on your post --
names listed may not be unique, may appear multiple times in col F seems to
be what you were after.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inputting data to one worksheet for it effect another daedalus1 Excel Discussion (Misc queries) 1 June 25th 06 04:39 PM
Pull data from another sheet based on certain criteria steve_sr2 Excel Discussion (Misc queries) 1 February 23rd 06 10:08 AM
Excel Macro to Copy & Paste [email protected] Excel Worksheet Functions 0 December 1st 05 01:56 PM
Sort pages? David Excel Discussion (Misc queries) 15 May 13th 05 11:33 PM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM


All times are GMT +1. The time now is 06:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"