Copy/paste cell A to new sheet if cell B=1or2

Closed
Jeremy - Jul 2, 2011 at 05:14 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jul 3, 2011 at 07:53 AM
Hello everybody,

I am slowly trying to learn about Macros to make my data sorting and report running easier and am asking for some help/guidance from the pros. I have a report that generates out of ART and exports to an Excel worksheet and I would like to have a Macro that will copy and paste the data from columns C, D and J in a given row only if the value in column J in that row equals 1, 2 or 3. If the value is not 1, 2 or 3 it will be blank or zero. For example, row 3 contains value in column C, value in column D and a value of 2 in column J, I would like for the macro to copy and paste each of those three cells onto a new sheet in columns A, B and C with a row 1 of those columns having a title (e.g. Column 1) in each of the top cells. I would like for the macro to continue searching the length of column J looking for values 1, 2 or 3 and then end after it has moved all data from each row with those value in column J onto the new sheet. If this even possible? And thanks for taking the time to read through my probably very comfusing explanation!!



1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Jul 3, 2011 at 07:53 AM
I for one was not able to completely get what you wanted. How ever see if this approach helps you in any way.
1. Apply the filter on the sheet for >=1 and <=3 column J This should show you only those rows that have either 1, 2 or 3 in column J

2. Copy the visible cells/rows
3. paste on your other sheet

You can record your actions to get a macro
0