[vba]. read values in color only on vba.

montecarlo2012

Well-known Member
Joined
Jan 26, 2011
Messages
986
Office Version
  1. 2010
Platform
  1. Windows
Hi everyone.
How to read only the values with colors in a column and display this values in a row in another sheet, small example don't need xl2BB I think, so couple images can show my point.
this is what I have on sheet2
1596656309381.png

and this is the results I am expecting on sheet3
1596656341932.png

Please, Can anyone tell me how to do this.
thank you.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Excellent DanteAmor. Thank you for your help.

You could simplify like this:
VBA Code:
Sub Macro8()
  Dim c As Variant, d As Range, j As Long
  
  j = 2
  For Each c In Array("I", "L", "O", "R", "U", "X", "AA")
    For Each d In Sheet2.Range(c & 1, Sheet2.Range(c & Rows.Count).End(3))
      If d.Interior.ColorIndex <> xlNone Then Sheet3.Cells(j, Sheet3.Cells(j, Columns.Count).End(1).Column + 1) = d
    Next d
    j = j + 1
  Next c
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top