Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cut Paste Coloured Text
Hi!
Me again. Now the task is that is there any way to Cut the complete row if one of its field "Result" have the RED COLOURED data from "Student Status" Worksheet, and Paste it to Fisrt Empty row of "Student Result". There are Four fields, Roll Number, Name, Class, Result. I applied the Conditional Formatting that if the filed "Result" has "Fail" then it will apper in RED COLOUR. Now I want that when I Click on the "Update" buttong located on "Update Database" Worksheet then all the Row having red coloured items in them will be coppied to 2nd sheet. Note that I can't copy that rows upon the text but their colour that is Red. Any One Could Help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cut Paste Coloured Text
You can try the following macro.
(The macro will first locate the column number for the column "Reult". Therefore, it won't matter where that column is positioned or you move it at a later time.) Sub move_rows() Dim tmp As Single Dim tmp2 As Integer Dim tmp_object As Object Dim rows_counter As Single, counter As Single Set tmp_object = Worksheets("Student Result") rows_counter = tmp_object.Range("A1").CurrentRegion.Rows.Count With Worksheets("Student Status").Range("A1").CurrentRegion For tmp = 1 To .Columns.Count If UCase(.Rows(1).Cells(tmp).Value) = "RESULT" Then tmp2 = tmp Exit For End If Next For tmp = 1 To .Rows.Count If .Rows(tmp).Cells(tmp2).Font.ColorIndex = 3 Then .Rows(tmp).Copy tmp_object.Rows(rows_counter + counter) counter = counter + 1 End If Next End With End Sub Regards, Edwin Tam http://www.vonixx.com/ "Saadi" wrote: Hi! Me again. Now the task is that is there any way to Cut the complete row if one of its field "Result" have the RED COLOURED data from "Student Status" Worksheet, and Paste it to Fisrt Empty row of "Student Result". There are Four fields, Roll Number, Name, Class, Result. I applied the Conditional Formatting that if the filed "Result" has "Fail" then it will apper in RED COLOUR. Now I want that when I Click on the "Update" buttong located on "Update Database" Worksheet then all the Row having red coloured items in them will be coppied to 2nd sheet. Note that I can't copy that rows upon the text but their colour that is Red. Any One Could Help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using coloured text within a Validation List | Excel Discussion (Misc queries) | |||
how do I add coloured text cell contents ? | Excel Discussion (Misc queries) | |||
Conditional formatting - coloured text | Excel Worksheet Functions | |||
Counting Coloured Text | Excel Discussion (Misc queries) | |||
Coloured text | Excel Discussion (Misc queries) |