resaltar numeros de una hoja a otra

dragonfire33

Board Regular
Joined
Oct 7, 2021
Messages
91
Office Version
  1. 365
Platform
  1. Windows
como puedo resaltar cualquier numero de la columna al a la hoja 2
12.png

13.png
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Debes usar VBA.

VBA Code:
Sub GetValuesFromYellowCells()
Dim srcWs, destWs As Worksheet
Dim lastR As Integer
Dim srcRng, cell As Range
Set srcWs = Sheets("Hoja1")
Set destWs = Sheets("Hoja2")
Set srcRng = srcWs.Range("AZ1:BW40")    ' range of source
For Each cell In srcRng
    lastR = destWs.Cells(Rows.Count, "AL").End(xlUp).Row + 1       ' column name into column with result on Hoja2
    If cell.Interior.Color = 65535 Then destWs.Cells(lastR, "AL").Value = cell.Value       ' as above column with results
Next cell
End Sub
 
Last edited:
Upvote 0
What do you mean by 'does not working'? Error? If yes in what line?
Check in vba editor code for you yellow, I've used 65535 as standard yellow from ribbon. Yours can be a bit different.
You can type in immediate window:
VBA Code:
debug.print Sheets("Hoja1").Range("BA9").Interior.color
and press Enter.
then put this here:
VBA Code:
 If cell.Interior.Color = XXXXX
 
Upvote 0

Forum statistics

Threads
1,225,840
Messages
6,187,329
Members
453,416
Latest member
JSmith0827

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