VBA Search a range for a value, then copy and paste data only from source to defined cells.

Davion615

New Member
Joined
Dec 12, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi there, I'm having trouble trying to find a way to populate a spreadsheet with data from an external source. Ideally what I'd like to do, is simply "select all" on a browser window that contains report card style information, and then paste it into a blank section of my excel sheet. What will happen then is I will have a bunch of information and a large number of cells, which contains "yes" or "no" entries corresponding to different attributes that are being scored. I want to search a range eg- D8 to AZ30 and when it finds the first value that equals "yes", I want it to copy all of the data from the first yes (eg, the first "yes" was found in E12) and copy everything to the right of the first "yes" all the way to AZ12 (it would be multiple cells to the right which all contain "yes" or "no" or "n/a") and I want to copy everything into a specified row on the sheet. I also want it to take the line below and do the same, as well as two lines below that, and the line below that, etc... how can I create a search function that identifies a specific cell starting point and then ask it to copy and paste everything to the right within a range, as well as the row below and then a few rows down? To clarify, I find E12 says "yes" take everything from E12-AW12 and copy it into E3‐AW3. Then take E13-AW13 and copy it to E4-AW4, then take E15-AW15 and copy to E6-AW6
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,224,743
Messages
6,180,686
Members
452,994
Latest member
Janick

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