Copy and Paste Row from sheet to sheet if Cells Match

Celticshadow

Active Member
Joined
Aug 16, 2010
Messages
395
Office Version
  1. 365
Platform
  1. Windows
Hi Forum

Would forum be kind enough to try and provide a solution for my formula problem in copying a row from one sheet to another dependent on a cell value matching.

I have two sheets one named Btn Fav and the other named Odds Tracker 1, if the cell I2 (containing horse name) in the Btn Fav sheet matches a cell in column B in the odds tracker sheet then I would like to copy the row from A to Q and paste it into the Btn Fav sheet starting at Col P through to Col AF. I have attached an example of what I would like to do as example. Many thanks for looking and hopefully providing a solution.

Regards
 

Attachments

  • Btn Fav sheet.png
    Btn Fav sheet.png
    34.9 KB · Views: 10
  • Odds Tracker sheet.png
    Odds Tracker sheet.png
    33.8 KB · Views: 10

Celticshadow

Active Member
Joined
Aug 16, 2010
Messages
395
Office Version
  1. 365
Platform
  1. Windows
I think it's because I did not absolute reference the formula at the beginning:



You can either copy the formula above and see if that works once you drag the autofill down, or press F4 on your various cell references to absolute reference the ranges on Odds Tracker 1. The criteria, i2, does not need to be changed. Apologies for the confusion, I thought you were getting an error on everything!
Hi TheMacroNoob

I think that works there is just one cell out of kilter from all 900 rows, I have to pop out just now for a wee bit to get some groceries but will fully check on return and get back to you but hopefully I think thats it. Many thanks and will get back to you.

Regards
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

TheMacroNoob

New Member
Joined
Aug 5, 2022
Messages
37
Office Version
  1. 365
Platform
  1. Windows
Hi TheMacroNoob

I think that works there is just one cell out of kilter from all 900 rows, I have to pop out just now for a wee bit to get some groceries but will fully check on return and get back to you but hopefully I think thats it. Many thanks and will get back to you.

Regards
Okay, that is good news! Apologies for not noticing the problem earlier, could have saved some time.
 

Celticshadow

Active Member
Joined
Aug 16, 2010
Messages
395
Office Version
  1. 365
Platform
  1. Windows
Hi TheMacroNoob

Many thanks for your help your solution works a treat and I really do appreciate you giving up your time and sharing your knowledge. You are a credit to forum and yourself, absolutely topnotch.

Regards
 

Forum statistics

Threads
1,186,083
Messages
5,955,727
Members
438,213
Latest member
ngvicu

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