Como trabajar color de una celda por macro

papasfritas

New Member
Joined
Sep 13, 2007
Messages
1
Hola tengo unos archivos con diferentes numeros de columnas, lo q tienen igual es el color de los encabezados de celdas q son todos los conceptos de percepciones de un color y deducciones de otro, de acuerdo al color necesito ponerle q concatene al titulo de la columna una "p" si es percepcion y una "d" si es deduccion, espero me puedan ayudar a resolver esto. Gracias
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Code:
SUB TEST()
Dim cel as range
For each cel in Range("1:1")

IF cel.interior.colorindex = 6 then

cel.value = cel.value & "p"

else
celvalue = cel.value & "d"
End iF
Next cel

END SUB
Esto seria un esquema muy basico.

GALILEOGALI
 
Upvote 0

Forum statistics

Threads
1,223,968
Messages
6,175,677
Members
452,666
Latest member
AllexDee

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