Group:  Microsoft Excel ยป microsoft.public.excel.newusers
Thread: fetching certain fields from 1 worksheet to another(if criteira me

fetching certain fields from 1 worksheet to another(if criteira me
prem 12/31/2008 7:14:03 AM
Hi guys this is the problem I'm having right now.

On sheet 1, I have the headings as follows:
student name NRIC number block number street name payment mode,
where student names are placed under column A, NRIC number under column B
and so on,

On sheet 2, I have the following headings:
account holder name A/C no. student name block number street name,
but this this time, the students name are placed in column C, block number
under column D and so on.

This is what I need:
There are only two payment modes (column O) in sheet 1; full and GIRO. When
the payment mode is GIRO, the fields student name, block number and street
name from sheet one need to be replicated in sheet 2 under the same headings.

How do I go about accomplishing this? Thank you guys for your help.

Regards,
Prem
Re: fetching certain fields from 1 worksheet to another(if criteira me
JBeaucaire <JBeaucaire.3l9v51[ at ]thecodecage.com> 12/31/2008 7:27:17 AM
The functions LOOKUP or VLOOKUP will do this for you. -- JBeaucaire ------------------------------------------------------------------------ JBeaucaire's Profile: http://www.thecodecage.com/forumz/member.php?userid=73 View this thread: http://www.thecodecage.com/forumz/showthread.php?t=45411
Re: fetching certain fields from 1 worksheet to another(if criteira me
Max 12/31/2008 8:01:04 AM
Here's a formulas play to deliver the required results dynamically from
Sheet1 into Sheet2

Source data is in Sheet1 as posted, data from row2 down
with key col = col O (payment mode)

In your Sheet2
Set aside an empty col to the right for the criteria, say col K?
Put in K2: =IF(Sheet1!O2="GIRO",ROW(),"")
Leave K1 empty. Copy K2 down to cover the max expected extent of data in
Sheet1's col O, say, down to K50?

Then to extract "student name" from Sheet1's col A (into col C in Sheet2),
Place this in C2, fill down to C50:
=IF(ROWS($1:1)>COUNT($K:$K),"",INDEX(Sheet1!A:A,SMALL($K:$K,ROWS($1:1))))

Similarly to extract corresponding "block number" & "street name" from
Sheet1's cols C & D (into cols D & E in Sheet2)
Place this in D2:
=IF(ROWS($1:1)>COUNT($K:$K),"",INDEX(Sheet1!C:C,SMALL($K:$K,ROWS($1:1))))
Copy D2 to E2, fill down to E50. All result lines will appear neatly packed
at the top.

P/s: The col to be returned from Sheet1 is defined in this part:
... INDEX(Sheet1!C:C,
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:21,000 Files:370 Subscribers:66
xdemechanik
---
"prem" wrote:
[Quoted Text]
> On sheet 1, I have the headings as follows:
> student name NRIC number block number street name payment mode,
> where student names are placed under column A, NRIC number under column B
> and so on,
>
> On sheet 2, I have the following headings:
> account holder name A/C no. student name block number street name,
> but this this time, the students name are placed in column C, block number
> under column D and so on.
>
> This is what I need:
> There are only two payment modes (column O) in sheet 1; full and GIRO. When
> the payment mode is GIRO, the fields student name, block number and street
> name from sheet one need to be replicated in sheet 2 under the same headings.
>
> How do I go about accomplishing this? Thank you guys for your help.
Re: fetching certain fields from 1 worksheet to another(if criteira me
"Max" <demechanik[ at ]yahoo.com> 12/31/2008 8:25:41 AM
"JBeaucaire"
[Quoted Text]
> The functions LOOKUP or VLOOKUP will do this for you.
Not in the OP's instance here. Believe s/he's looking for multiple line
returns (where "GIRO" appears in the payment column)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:21,000 Files:370 Subscribers:66
xdemechanik
---


Home | Search | Terms | Imprint
Newsgroups Reader