Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using coloured text within a Validation List Big Geordie Excel Discussion (Misc queries) 1 July 24th 09 07:42 PM
how do I add coloured text cell contents ? Dave P[_2_] Excel Discussion (Misc queries) 2 May 4th 09 07:37 PM
Conditional formatting - coloured text Jennie Excel Worksheet Functions 8 June 20th 08 03:28 PM
Counting Coloured Text Killer Excel Discussion (Misc queries) 1 June 19th 07 11:24 PM
Coloured text David Crawt[_2_] Excel Discussion (Misc queries) 2 April 23rd 07 10:48 PM


All times are GMT +1. The time now is 04:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"