Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
is there any macro that if i want to copy only those rows (row lentgh
cell A to cell F) from sheet 1 to sheet 2 in which any cell in coloumn B got Red colour by conditional formatting. Please just need the macro if anybody can help. thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Check your original posting.
"K" wrote: is there any macro that if i want to copy only those rows (row lentgh cell A to cell F) from sheet 1 to sheet 2 in which any cell in coloumn B got Red colour by conditional formatting. Please just need the macro if anybody can help. thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub cpyColr()
Dim c As Range lastRw = Worksheets(1).Cells(Rows.Count, 2).End(xlUp).Row For Each c In Worksheets(1).Range("B2:B" & lastRw) If c.FormatConditions.Count 0 Then If c.FormatConditions(1).Interior.ColorIndex = 3 Then lstRw2 = Worksheets(2).Range("A65536").End(xlUp).Row cRng = c.Address Worksheets(1).Range("A" & Range(cRng).Row & ":F" & _ Range(cRng).Row).Copy Worksheets(2).Range("A" & lstRw2 + 1) End If End If Next End Sub "K" wrote: is there any macro that if i want to copy only those rows (row lentgh cell A to cell F) from sheet 1 to sheet 2 in which any cell in coloumn B got Red colour by conditional formatting. Please just need the macro if anybody can help. thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 15 Dec, 18:31, JLGWhiz wrote:
Sub cpyColr() Dim c As Range lastRw = Worksheets(1).Cells(Rows.Count, 2).End(xlUp).Row For Each c In Worksheets(1).Range("B2:B" & lastRw) If c.FormatConditions.Count 0 Then If c.FormatConditions(1).Interior.ColorIndex = 3 Then lstRw2 = Worksheets(2).Range("A65536").End(xlUp).Row cRng = c.Address Worksheets(1).Range("A" & Range(cRng).Row & ":F" & _ Range(cRng).Row).Copy Worksheets(2).Range("A" & lstRw2 + 1) End If End If Next End Sub "K" wrote: is there any macro that if i want to copy only those rows (row lentgh cell A to cell F) from sheet 1 to sheet 2 in which any cell in coloumn B got Red colour by conditional formatting. Please just need the macro if anybody can help. thanks- Hide quoted text - - Show quoted text - Thanks JLG |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy rows from one Data sheet to another sheet based on cell conte | Excel Discussion (Misc queries) | |||
Copy rows onto existing sheet / start a new sheet if full | Excel Programming | |||
Search for rows in one sheet and copy into another sheet based on customer id | Excel Worksheet Functions | |||
Help: auto-copy entire rows from 1 sheet (based on cell criteria) to another sheet. | Excel Programming | |||
copy rows to sheet 2 | Excel Programming |