Copy row data IF statement

HoldemHank

New Member
Joined
Sep 10, 2011
Messages
4
I have a sheet with 3 columns of data. I need a function or script that looks in column A and column B for data. If both columns match the data I am looking for that I want the cell in column C (in the same row it found the match) copied over another sheet.

Hope this makes sense
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
i don't completely understand your post to give you a more exact answer, but you will need to either use the =VLOOKUP or the =MATCH formulas. Excel help has really good tutorials for how they work if you just hit F1 while Excel is active.
 
Upvote 0
Driver Laps Time
Hank 1 22.10
Hank 2 22.15
Hank 3 22.2

If column A is the driver name, B the number laps run and Column C the lap time.

I need a function that will look in Column A for a driver name and in column B for number of laps ran and return me the lap time in column C and so one.
 
Upvote 0
IF column A says "hank" and column B says "2" return me the lap time in Column C. In this example it would return "22.15"
 
Upvote 0
Yes, I understand that part. The question is where you are planing to insert the formula and where your reference cells are...since I am not sure what you want, I'm going to make an assumption. (Please be more specific next time)

The following formula is for the name you want being in A1 on Sheet2 and the lap # you want being in B1 also on Sheet2. I also assume just 3 rows of data in rows 2-4 w/ headers in row 1, like you posted previously, w/ this data located on Sheet1. (NOTE: if you have more than 3 rows of data, you will have to adjust the array references in the following formula.) Finally, type this formula into C1 on Sheet2, BUT DO NOT HIT ENTER!!!

=INDEX(Sheet1!$C$2:$C$4,MATCH(1,(A1=Sheet1!$A$2:$A$4)*(B1=Sheet1!$B$2:$B$4),0))

NOW, hold ctrl + shift, and hit enter. This will add {} around the formula (NOTE: you cannot type these into the formula bar; you will not get the same result.) The {} make it an array formula. And there you have it! If you followed everything exactly, should work.
 
Upvote 0

Forum statistics

Threads
1,224,566
Messages
6,179,555
Members
452,928
Latest member
101blockchains

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
Back
Top