Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Need data from one worksheet to be in a list in another worksheet.

Worksheet 1
A B C D
12956-01 A 5 9
94539-03B D 3 7
45567-02 A 20 8
12956-02B B 12 2
947345-05 Q 2 3

Worksheet 2
A B C
12956
12956-01 5
12956-02B 12

Is there a formula where I can take everything starting with 12956 in Col A
and its value in Col C from Worksheet 1 and put it in Worksheet 2? In
worksheet 2 I have the 6 digit number I am looking for located in A1 because
I will need to change it often, but in worksheet 1 that number has an hyphen
with up 3 characters behind it.

My worksheet 1 has a few thousand rows and I just can't seem to find the
right formula. Can anyone help?
  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Need data from one worksheet to be in a list in another worksheet.

Here's a non-array formulas play which could deliver the desired results ..

Assume source data in cols A to D in sheet named: X, data from row2 down

12956-01 A 5 9
94539-03B D 3 7
45567-02 A 20 8

etc

In a new sheet,
A1 will house the input, eg: 12956

Put in B2:
=IF($A$1="","",IF(SUMPRODUCT(--ISNUMBER(SEARCH($A$1,X!A2)))0,ROW(),""))
(Leave B1 empty)

Put in C2:
=IF(ROW(A1)COUNT($B:$B),"",INDEX(X!A:A,MATCH(SMAL L($B:$B,ROW(A1)),$B:$B,0)))
Copy C2 across to F2

Then just select B2:F2 and copy down to cover the max expected extent of
data in X, say down to F100. Hide away col B. Cols C to F will return the
results from X, with all lines neatly bunched the top.

If you only want to extract cols A and C from X into the new sheet,
then skip the "Copy C2 across to F2" step above.

Instead, just put in D2:
=IF(ROW(A1)COUNT($B:$B),"",INDEX(X!C:C,MATCH(SMAL L($B:$B,ROW(A1)),$B:$B,0)))

Then select B2:D2 and copy down as before.
Cols A and C from X will be extracted into cols C and D in the new sheet.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Kris R" wrote:

Worksheet 1
A B C D
12956-01 A 5 9
94539-03B D 3 7
45567-02 A 20 8
12956-02B B 12 2
947345-05 Q 2 3

Worksheet 2
A B C
12956
12956-01 5
12956-02B 12

Is there a formula where I can take everything starting with 12956 in Col A
and its value in Col C from Worksheet 1 and put it in Worksheet 2? In
worksheet 2 I have the 6 digit number I am looking for located in A1 because
I will need to change it often, but in worksheet 1 that number has an hyphen
with up 3 characters behind it.

My worksheet 1 has a few thousand rows and I just can't seem to find the
right formula. Can anyone help?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Need data from one worksheet to be in a list in another worksh

Hi Biff,

No, there are no duplicates in column A. There should never be for example
two 123456-01, instead one would be -01 and another may be -01B

Kris

"Biff" wrote:

Are there any duplicates in column A?

Biff

"Kris R" <Kris wrote in message
...
Worksheet 1
A B C D
12956-01 A 5 9
94539-03B D 3 7
45567-02 A 20 8
12956-02B B 12 2
947345-05 Q 2 3

Worksheet 2
A B C
12956
12956-01 5
12956-02B 12

Is there a formula where I can take everything starting with 12956 in Col
A
and its value in Col C from Worksheet 1 and put it in Worksheet 2? In
worksheet 2 I have the 6 digit number I am looking for located in A1
because
I will need to change it often, but in worksheet 1 that number has an
hyphen
with up 3 characters behind it.

My worksheet 1 has a few thousand rows and I just can't seem to find the
right formula. Can anyone help?






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Need data from one worksheet to be in a list in another worksh

Max,

Thanks for the help. I will try this and see how it works. I was looking at
a lot of the functions below, but I didn't know how to string them all
together.

Kris

"Max" wrote:

Here's a non-array formulas play which could deliver the desired results ..

Assume source data in cols A to D in sheet named: X, data from row2 down

12956-01 A 5 9
94539-03B D 3 7
45567-02 A 20 8

etc

In a new sheet,
A1 will house the input, eg: 12956

Put in B2:
=IF($A$1="","",IF(SUMPRODUCT(--ISNUMBER(SEARCH($A$1,X!A2)))0,ROW(),""))
(Leave B1 empty)

Put in C2:
=IF(ROW(A1)COUNT($B:$B),"",INDEX(X!A:A,MATCH(SMAL L($B:$B,ROW(A1)),$B:$B,0)))
Copy C2 across to F2

Then just select B2:F2 and copy down to cover the max expected extent of
data in X, say down to F100. Hide away col B. Cols C to F will return the
results from X, with all lines neatly bunched the top.

If you only want to extract cols A and C from X into the new sheet,
then skip the "Copy C2 across to F2" step above.

Instead, just put in D2:
=IF(ROW(A1)COUNT($B:$B),"",INDEX(X!C:C,MATCH(SMAL L($B:$B,ROW(A1)),$B:$B,0)))

Then select B2:D2 and copy down as before.
Cols A and C from X will be extracted into cols C and D in the new sheet.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Kris R" wrote:

Worksheet 1
A B C D
12956-01 A 5 9
94539-03B D 3 7
45567-02 A 20 8
12956-02B B 12 2
947345-05 Q 2 3

Worksheet 2
A B C
12956
12956-01 5
12956-02B 12

Is there a formula where I can take everything starting with 12956 in Col A
and its value in Col C from Worksheet 1 and put it in Worksheet 2? In
worksheet 2 I have the 6 digit number I am looking for located in A1 because
I will need to change it often, but in worksheet 1 that number has an hyphen
with up 3 characters behind it.

My worksheet 1 has a few thousand rows and I just can't seem to find the
right formula. Can anyone help?

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Need data from one worksheet to be in a list in another worksh

Ed,

Thanks for your response. It's been about 5 years since I've written code
and frankly, I only remember enough to know that I don't want to even attempt
it. :)

Kris

"galimi" wrote:

You will need to accomplish this with code. Programmatically, you can have
your macro cycle through the entire sheet & when your condition is met, it
will copy over the contents you desire.
--
http://HelpExcel.com

516-984-0252


"Kris R" wrote:

Worksheet 1
A B C D
12956-01 A 5 9
94539-03B D 3 7
45567-02 A 20 8
12956-02B B 12 2
947345-05 Q 2 3

Worksheet 2
A B C
12956
12956-01 5
12956-02B 12

Is there a formula where I can take everything starting with 12956 in Col A
and its value in Col C from Worksheet 1 and put it in Worksheet 2? In
worksheet 2 I have the 6 digit number I am looking for located in A1 because
I will need to change it often, but in worksheet 1 that number has an hyphen
with up 3 characters behind it.

My worksheet 1 has a few thousand rows and I just can't seem to find the
right formula. Can anyone help?

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Need data from one worksheet to be in a list in another worksh

Hi Max

Your formula worked PERFECTLY!! Thank you so very much.

Kris

"Max" wrote:

Here's a non-array formulas play which could deliver the desired results ..

Assume source data in cols A to D in sheet named: X, data from row2 down

12956-01 A 5 9
94539-03B D 3 7
45567-02 A 20 8

etc

In a new sheet,
A1 will house the input, eg: 12956

Put in B2:
=IF($A$1="","",IF(SUMPRODUCT(--ISNUMBER(SEARCH($A$1,X!A2)))0,ROW(),""))
(Leave B1 empty)

Put in C2:
=IF(ROW(A1)COUNT($B:$B),"",INDEX(X!A:A,MATCH(SMAL L($B:$B,ROW(A1)),$B:$B,0)))
Copy C2 across to F2

Then just select B2:F2 and copy down to cover the max expected extent of
data in X, say down to F100. Hide away col B. Cols C to F will return the
results from X, with all lines neatly bunched the top.

If you only want to extract cols A and C from X into the new sheet,
then skip the "Copy C2 across to F2" step above.

Instead, just put in D2:
=IF(ROW(A1)COUNT($B:$B),"",INDEX(X!C:C,MATCH(SMAL L($B:$B,ROW(A1)),$B:$B,0)))

Then select B2:D2 and copy down as before.
Cols A and C from X will be extracted into cols C and D in the new sheet.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Kris R" wrote:

Worksheet 1
A B C D
12956-01 A 5 9
94539-03B D 3 7
45567-02 A 20 8
12956-02B B 12 2
947345-05 Q 2 3

Worksheet 2
A B C
12956
12956-01 5
12956-02B 12

Is there a formula where I can take everything starting with 12956 in Col A
and its value in Col C from Worksheet 1 and put it in Worksheet 2? In
worksheet 2 I have the 6 digit number I am looking for located in A1 because
I will need to change it often, but in worksheet 1 that number has an hyphen
with up 3 characters behind it.

My worksheet 1 has a few thousand rows and I just can't seem to find the
right formula. Can anyone help?

  #9   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Need data from one worksheet to be in a list in another worksh

Delighted to hear that, Kris !
You're welcome and thanks for feeding back ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Kris R" wrote:
Hi Max
Your formula worked PERFECTLY!! Thank you so very much.
Kris

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
macro unouwanme Excel Discussion (Misc queries) 9 August 31st 06 09:38 PM
Populating worksheet via a drop down list ! kuansheng Excel Worksheet Functions 4 February 14th 06 05:48 AM
Using a data validation list to look up a defined named range in another worksheet Laura Hunt Charts and Charting in Excel 0 November 24th 05 02:29 PM
Comparing a list to a Calendar worksheet. PatrickL Excel Worksheet Functions 0 August 25th 05 04:21 PM
Convert PivotTable data into a worksheet list sansk_23 Excel Worksheet Functions 3 May 2nd 05 09:51 AM


All times are GMT +1. The time now is 12:50 AM.

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

About Us

"It's about Microsoft Excel"