ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   copy data from 1 worksheet to another based on a condition (https://www.excelbanter.com/excel-worksheet-functions/103151-copy-data-1-worksheet-another-based-condition.html)

[email protected]

copy data from 1 worksheet to another based on a condition
 
Hi I need this information urgently...
Sheet 1 has some data. I put a "IF" condition which when satisfied
needs to input data into Sheet 2. But the problem is that if the
condition is not satisfied it is copying with blanks..


starguy

copy data from 1 worksheet to another based on a condition
 

what do you want to do..??

Wrote:
Hi I need this information urgently...
Sheet 1 has some data. I put a "IF" condition which when satisfied
needs to input data into Sheet 2. But the problem is that if the
condition is not satisfied it is copying with blanks..



--
starguy
------------------------------------------------------------------------
starguy's Profile:
http://www.excelforum.com/member.php...o&userid=32434
View this thread: http://www.excelforum.com/showthread...hreadid=568272


Barb Reinhardt

copy data from 1 worksheet to another based on a condition
 
I'm thinking you may need to do this with VBA. You may want to ask your
question in the PROGRAMMING group.

" wrote:

Hi I need this information urgently...
Sheet 1 has some data. I put a "IF" condition which when satisfied
needs to input data into Sheet 2. But the problem is that if the
condition is not satisfied it is copying with blanks..



Pete_UK

copy data from 1 worksheet to another based on a condition
 
Could do with a bit more detail, but your IF statement should be of
this form:

=IF(your_condition, action_if_true, action_if_false)

the "action_if_false" may be set to "" (i.e. return blanks), so you
will need to amend this part if you do not want blanks when the
condition is not met.

Hope this helps.

Pete

wrote:
Hi I need this information urgently...
Sheet 1 has some data. I put a "IF" condition which when satisfied
needs to input data into Sheet 2. But the problem is that if the
condition is not satisfied it is copying with blanks..



[email protected]

copy data from 1 worksheet to another based on a condition
 
Hi this is exactly what i am looking for..
I have A-sheet which has columns as below -
Dept group offer
abc aa reject
xyz bb accept

So I need all the the data from dept and group on B-sheet if the offer
is accept. If I put a plain 'if' formula then the data is getting
copied to the same row as in A-sheet leaving blank rows in between..



Pete_UK wrote:
Could do with a bit more detail, but your IF statement should be of
this form:

=IF(your_condition, action_if_true, action_if_false)

the "action_if_false" may be set to "" (i.e. return blanks), so you
will need to amend this part if you do not want blanks when the
condition is not met.

Hope this helps.

Pete

wrote:
Hi I need this information urgently...
Sheet 1 has some data. I put a "IF" condition which when satisfied
needs to input data into Sheet 2. But the problem is that if the
condition is not satisfied it is copying with blanks..



Max

copy data from 1 worksheet to another based on a condition
 
One way to achieve this using non-array formulas.

Source data assumed in sheet: A, cols A to C, data from row2 down.
Col C = key col with the values either: offer or accept

In sheet: B,

Create a DV in A1 to select the options: offer or accept
(Data Validation, Allow: List, Source: accept, reject)

Paste the same col labels into B1:D1

In A2:
=IF($A$1="","",IF(A!C2="","",IF(A!C2=$A$1,ROW(),"" )))

In B2:
=IF(ROW(A1)COUNT($A:$A),"",INDEX(A!A:A,MATCH(SMAL L($A:$A,ROW(A1)),$A:$A,0)))
Copy B2 to D2

Then just select A2:D2 and fill down to cover the max expected extent of
data in A. The required results will appear in cols B to D, all neatly
bunched at the top, ie only lines corresponding to the selection made in the
DV in A1. If "accept" is selected, then only "accept" lines will appear.
Ditto for "reject".
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
" wrote:
Hi this is exactly what i am looking for..
I have A-sheet which has columns as below -
Dept group offer
abc aa reject
xyz bb accept

So I need all the the data from dept and group on B-sheet if the offer
is accept. If I put a plain 'if' formula then the data is getting
copied to the same row as in A-sheet leaving blank rows in between..



Pete_UK wrote:
Could do with a bit more detail, but your IF statement should be of
this form:

=IF(your_condition, action_if_true, action_if_false)

the "action_if_false" may be set to "" (i.e. return blanks), so you
will need to amend this part if you do not want blanks when the
condition is not met.

Hope this helps.

Pete

wrote:
Hi I need this information urgently...
Sheet 1 has some data. I put a "IF" condition which when satisfied
needs to input data into Sheet 2. But the problem is that if the
condition is not satisfied it is copying with blanks..




Max

copy data from 1 worksheet to another based on a condition
 
Here's a sample construct for the foregoing:
http://cjoint.com/?ixpVOLwU05
Autocopy cases by key col value to new sht.xls
(Link is good for 14 days)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

Max

copy data from 1 worksheet to another based on a condition
 
Here's a sample construct for the foregoing:
http://cjoint.com/?ixpVOLwU05
Autocopy cases by key col value to new sht.xls
(Link is good for 14 days)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Max" wrote:
One way to achieve this using non-array formulas.

Source data assumed in sheet: A, cols A to C, data from row2 down.
Col C = key col with the values either: offer or accept

In sheet: B,

Create a DV in A1 to select the options: offer or accept
(Data Validation, Allow: List, Source: accept, reject)

Paste the same col labels into B1:D1

In A2:
=IF($A$1="","",IF(A!C2="","",IF(A!C2=$A$1,ROW(),"" )))

In B2:
=IF(ROW(A1)COUNT($A:$A),"",INDEX(A!A:A,MATCH(SMAL L($A:$A,ROW(A1)),$A:$A,0)))
Copy B2 to D2

Then just select A2:D2 and fill down to cover the max expected extent of
data in A. The required results will appear in cols B to D, all neatly
bunched at the top, ie only lines corresponding to the selection made in the
DV in A1. If "accept" is selected, then only "accept" lines will appear.
Ditto for "reject".
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
" wrote:
Hi this is exactly what i am looking for..
I have A-sheet which has columns as below -
Dept group offer
abc aa reject
xyz bb accept

So I need all the the data from dept and group on B-sheet if the offer
is accept. If I put a plain 'if' formula then the data is getting
copied to the same row as in A-sheet leaving blank rows in between..



Pete_UK wrote:
Could do with a bit more detail, but your IF statement should be of
this form:

=IF(your_condition, action_if_true, action_if_false)

the "action_if_false" may be set to "" (i.e. return blanks), so you
will need to amend this part if you do not want blanks when the
condition is not met.

Hope this helps.

Pete

wrote:
Hi I need this information urgently...
Sheet 1 has some data. I put a "IF" condition which when satisfied
needs to input data into Sheet 2. But the problem is that if the
condition is not satisfied it is copying with blanks..




[email protected]

copy data from 1 worksheet to another based on a condition
 
Thanks a ton...

Max wrote:
Here's a sample construct for the foregoing:
http://cjoint.com/?ixpVOLwU05
Autocopy cases by key col value to new sht.xls
(Link is good for 14 days)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Max" wrote:
One way to achieve this using non-array formulas.

Source data assumed in sheet: A, cols A to C, data from row2 down.
Col C = key col with the values either: offer or accept

In sheet: B,

Create a DV in A1 to select the options: offer or accept
(Data Validation, Allow: List, Source: accept, reject)

Paste the same col labels into B1:D1

In A2:
=IF($A$1="","",IF(A!C2="","",IF(A!C2=$A$1,ROW(),"" )))

In B2:
=IF(ROW(A1)COUNT($A:$A),"",INDEX(A!A:A,MATCH(SMAL L($A:$A,ROW(A1)),$A:$A,0)))
Copy B2 to D2

Then just select A2:D2 and fill down to cover the max expected extent of
data in A. The required results will appear in cols B to D, all neatly
bunched at the top, ie only lines corresponding to the selection made in the
DV in A1. If "accept" is selected, then only "accept" lines will appear.
Ditto for "reject".
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
" wrote:
Hi this is exactly what i am looking for..
I have A-sheet which has columns as below -
Dept group offer
abc aa reject
xyz bb accept

So I need all the the data from dept and group on B-sheet if the offer
is accept. If I put a plain 'if' formula then the data is getting
copied to the same row as in A-sheet leaving blank rows in between..



Pete_UK wrote:
Could do with a bit more detail, but your IF statement should be of
this form:

=IF(your_condition, action_if_true, action_if_false)

the "action_if_false" may be set to "" (i.e. return blanks), so you
will need to amend this part if you do not want blanks when the
condition is not met.

Hope this helps.

Pete

wrote:
Hi I need this information urgently...
Sheet 1 has some data. I put a "IF" condition which when satisfied
needs to input data into Sheet 2. But the problem is that if the
condition is not satisfied it is copying with blanks..




Max

copy data from 1 worksheet to another based on a condition
 
You're welcome !
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
" wrote:
Thanks a ton...



All times are GMT +1. The time now is 11:23 PM.

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