Thank you for taking time to read this.
1. I created a post here Modify VBA to select Cells with Red Font Copy only cells not row which was anwered by a kind member- it was based on a tutorial I was learning from and it now does what was required
Using This Code
I wanted to ask how to make it more efficient
In the actual worksheet that I have it has 35000 rows and 60 Columns with different values - the way I am doing it now is using Find Replace entering the Word I need to find - in each cell - then CTRL A - then changing the font color to Red then using this Code you he kindly provided. So I need to run this process 60 times
Is it possible for me to get this done faster by putting in Sheet 1 in another Column for example Col E all the values I need it to look for and then Put them each in a new Sheet?
Or can anyone kindly suggest a more efficient way of doing this task. thank you
1. I created a post here Modify VBA to select Cells with Red Font Copy only cells not row which was anwered by a kind member- it was based on a tutorial I was learning from and it now does what was required
Using This Code
VBA Code:
Sub baz9d93()
Dim ce As Range, lastrow As Long, lastcol As Long, i As Long
Dim wsA As Worksheet, wsH As Worksheet
Set wsA = Sheets("All Transactions")
Set wsH = Sheets("Highlighted Transactions")
lastrow = wsA.Range("A" & Rows.Count).End(xlUp).Row
lastcol = wsA.Cells.SpecialCells(xlCellTypeLastCell).Column
Application.ScreenUpdating = False
For Each ce In wsA.Range(wsA.Cells(2, 2), wsA.Cells(lastrow, lastcol))
If ce.Font.Color = RGB(255, 0, 0) Then
ce.Copy wsH.Range(ce.Address)
wsH.Range("A" & ce.Row).Value = wsA.Range("A" & ce.Row).Value
End If
Next ce
lastrow = wsH.Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To lastrow
If wsH.Cells(i, 1).Value = "" Then wsH.Cells(i, 1).EntireRow.Delete
Next i
wsH.Columns.AutoFit
Application.ScreenUpdating = True
End Sub
I wanted to ask how to make it more efficient
In the actual worksheet that I have it has 35000 rows and 60 Columns with different values - the way I am doing it now is using Find Replace entering the Word I need to find - in each cell - then CTRL A - then changing the font color to Red then using this Code you he kindly provided. So I need to run this process 60 times
Is it possible for me to get this done faster by putting in Sheet 1 in another Column for example Col E all the values I need it to look for and then Put them each in a new Sheet?
Or can anyone kindly suggest a more efficient way of doing this task. thank you