Cell Selection Question

rjacmuto32

Board Regular
Joined
Jul 14, 2004
Messages
98
I have a table which the amount of rows changes each month. I have about 10 columns on it always the same. Column A is a project ID. Sevearl rows can contain the same project id.

I want to keep my file size down. Is there any way to copy say Columns C-H anytime Column A contains a certain project ID? I tried to record the macro but it puts the row number in the macro. However my row number varies depending on the project id. How do I ignore the row number.

Project ID = 977 is on say 3 rows in my table (they are in consecutive order). How can I copy columns C-H for those 3 rows and paste into another sheet?
 
I changed it up and it died at the Special cells part of the code.

Also I don't want to copy the whole row. The destination will be a summary page and I only want to copy Column C-F for each row that has my certain ID number.
 
Upvote 0

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
I changed it up and it died at the Special cells part of the code.

Also I don't want to copy the whole row. The destination will be a summary page and I only want to copy Column C-F for each row that has my certain ID number.
Okay, so I am guessing Column A does not contain formulas... good. Now, are you running the macro when the sheet with your data on it is active (as written, that is a requirement, but it can be changed if you tell us the name of the sheet containing your data)?

Oh, and don't worry about the code copying the whole row (that is done for speed purposes), the excess columns are removed at the end of the code).
 
Upvote 0

Forum statistics

Threads
1,216,119
Messages
6,128,947
Members
449,480
Latest member
yesitisasport

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