Using IF to copy data between sheets Help please

Paulbo

New Member
Joined
Nov 6, 2002
Messages
1
Greetings All,

I've got a task for an assignment thats driving me crazy...

I've got a worksheet called Data & one called Male (in the same wookbook). The data sheets lists gender (as M or F) & values related to height and weight.

My task is : "Use an IF function to copy appropriate male data from the data worksheet to the male worksheet"

I've worked out how to get a M result or leave a blank if its female in the Gender column on sheet Male but cannot figure out how to transfer the data for the other characteristics.

My starting point is :
=IF(Data!$B2="M","M","")

Now what do I do? Do I need nested IF statements or can the value_if_true be made to include all value on that row from Data sheet?

Second question - the row range is 2:207 - do I just fill the formula down or can it all be done with one IF statement using 2:207 arguement (somehow)?

Thanks in advance for any help.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

inarbeth

Well-known Member
Joined
Apr 8, 2002
Messages
912
There may be another way to solve your problem. Filter the data on the datasheet to show only male data. Then copy the data and select the relevant top left hand corner cell in the Data sheet, then Edit, Paste Special and paste links to copy over links to the Male data.
 

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,123
Paulbo -

say your data is in Data C, D & E

in Male sheet - to replicate the data in C2

=IF(DATA!$B2="M",DATA!C2,"")

copy this formula across D & E and you will get the results from DATA!D2 & E2 if B2 (gender) is Male.

Inarbeth - love the photos of Wivenhoe...used to live on Parkwood Avenue (by the park)...got any of the Cricket Club or Broad Lane (FC)???
 

Forum statistics

Threads
1,144,254
Messages
5,723,269
Members
422,489
Latest member
MyForcey

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top