Hello Everyone,
I'm having a problem with removing specific data off a spreadsheet.
Can someone give me a macro to fix the problem of removing the specified data and leaving only the red and blue data on the my worksheet?
Thanks your assistance.
Hello Everyone,
I'm having a problem with removing specific data off a spreadsheet.
Can someone give me a macro to fix the problem of removing the specified data and leaving only the red and blue data on the my worksheet?
Thanks your assistance.
T this on a copy of your data, make sure there is no data off to the right anywhere.
![]()
Option Explicit Sub ReduceData() Dim LR As Long, rw As Long, cell As Range LR = Range("A" & Rows.Count).End(xlUp).Row Application.ScreenUpdating = False For rw = LR To 1 Step -1 For Each cell In Range("A" & rw).Resize(, 16) If cell.Value <> "" Then If cell.Characters(1, 1).Font.ColorIndex <> 3 And cell.Characters(1, 1).Font.ColorIndex <> 5 Then cell = "" End If Next cell If Application.CountA(Rows(rw)) = 0 Then Rows(rw).Delete xlShiftUp End If Next rw Application.ScreenUpdating = True End Sub
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
Thanks JBeaucaire,
It works wonderfully! It works on other worksheets as-well.
Thanks again.
As it appears you've reached a conclusion, I've marked this thread SOLVED for you.FYI, this is done through the Thread Tools located above the first post in this thread. Thanks.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks