Copying a row of a cell colored Red to 'Under SAT' worksheet and green to 'Over SAT' worksheet

CFC2018

New Member
Joined
Aug 23, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
I need help with a scenario and have no clue about macros, rules, etc...

I have a worksheet titled "ALL Calls". I have formatted the spreadsheet for the cells in column G to turn red if they're under $250,000 and green if they're over $250,000. I need the entire row of the red cells from 'ALL Calls' to be copied to the last row of the sheet called 'Under SAT' and the entire row of the green cells from 'ALL Calls' to the last row of the sheet called 'Over SAT'.

Is this possible?
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Welcome to the Board!

I see that you appear to be using Excel 365. This is very fortunate for you, as there is a great new function in Excel 365 that makes this really easy.
It is called the FITLER function (not to be confused with the old Filter functionality).
It is a dynamic spill formula, that automatically updates as your data updates.

So if you have a "ALL Calls" sheet, and want to have two new sheets/lists called "Under SAT" and "Over SAT" that get there data from the "ALL Calls" sheet, this can be done very easily.
See here for details on how to use the FILTER function. Obviously, column G is what you will be using in your criteria.
 
Upvote 0
This macro assumes you have headers in row 1 and the data starts in row 2 with no blank rows.
VBA Code:
Sub CopyData()
    Application.ScreenUpdating = False
    Range("A1").CurrentRegion.AutoFilter Field:=7, Criteria1:=">250000"
    ActiveSheet.AutoFilter.Range.Offset(1).Copy Sheets("Over SAT").Cells(Sheets("Over SAT").Rows.Count, "A").End(xlUp).Offset(1)
    Range("A1").CurrentRegion.AutoFilter Field:=7, Criteria1:="<250000"
    ActiveSheet.AutoFilter.Range.Offset(1).Copy Sheets("Under SAT").Cells(Sheets("Under SAT").Rows.Count, "A").End(xlUp).Offset(1)
    Range("A1").AutoFilter
    Application.ScreenUpdating = True
End Sub
 
Upvote 0
Ok, so I go to the new sheet labeled 'Under SAT' and in the cell I have

=FILTER('ALL Calls'!A2:G31,

but what do I put after this for if the cell is red, copy? I'm sorry. I really not smart with excel and all of it's features.
 
Upvote 0
Welcome to the Board!

I see that you appear to be using Excel 365. This is very fortunate for you, as there is a great new function in Excel 365 that makes this really easy.
It is called the FITLER function (not to be confused with the old Filter functionality).
It is a dynamic spill formula, that automatically updates as your data updates.

So if you have a "ALL Calls" sheet, and want to have two new sheets/lists called "Under SAT" and "Over SAT" that get there data from the "ALL Calls" sheet, this can be done very easily.
See here for details on how to use the FILTER function. Obviously, column G is what you will be using in your criteria.
Ok, so I go to the new sheet labeled 'Under SAT' and in the cell I have

=FILTER('ALL Calls'!A2:G31,

but what do I put after this for if the cell is red, copy? I'm sorry. I really not smart with excel and all of it's features.
 
Upvote 0
Excel formulas cannot work off of formatting, only values.
But you don't need to worry about the color, as the color is already predicated on values, i.e. whether column G is over or under $250,000.
So your criteria would be checking the value in column G, not the color.

Look at the "Basic Example" here for how to set up criteria based on "greater than" or "less than" some number:
 
Upvote 0
Solution

Forum statistics

Threads
1,223,896
Messages
6,175,260
Members
452,627
Latest member
KitkatToby

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