Jump to content

Excell VBA command to fill a Cell with a color

Hey guys,

i got a little problem with a VBA command.

I need certain cells to come up in the color.index=4 if the cell has the word "Voll" inside.

The cells where the word can come up are in the range of (P5:S18).

I already tried google but i couldn´t find a solution that i can adapt...

 

Thanks for Tips!

My System: AsRock Z77 Extreme4-m, Intel Core i5 2500K @4 Ghz, 8 GB of RAM, ASUS GTX 970(4GB)

1 TB of SSD Storage, BeQuiet Pure Power 730W PSU - All stuffed in a Corsair Obsidian 350D

Link to comment
Share on other sites

Link to post
Share on other sites

Just use the conditional formatting.

 

  • Highligh all the data that could have the word Voll in or w/e
  • Click Home
  • Conditional Formatting button
  • Highlight cell rules
  • Equal To or Text that contains (depending if other words are in the box as -well as Voll..)
  • Type in Voll in the box
  • In the drop down click custom format
  • Go to fill
  • And choose the color you want.

You can even create multiple rules in the same cells so it will change color depending on what is in the box.

 

Only one I know how to use :D

PC SYSTEM: Fractal Design Arc Midi R2 / i5 2500k @ 4.2ghz / CM Hyper 212 EVO / Gigabyte 670 OC SLI / MSI P67A-GD53 B3 / Kingston HyperX Blue 8Gb / 

WD 2tb Storage Drive / BenQ GW2750HM - ASUS VE248H - Panasonic TX-P42ST60BCorsair AX750 / Logitech K360 / Razer Naga / Plantronics Gamecom 380 /

Asus Xonar DGX / Samsung 830 256gb / MEDIA eMachine ER1401 running OpenELEC XBMC with Seagate STBV3000200 3TB Hard Drive - Panasonic TX-P42ST60B

Link to comment
Share on other sites

Link to post
Share on other sites

I think it's only done via conditional formatting ^ by doing so doesn't create an additional function in the formula tab (to my knowledge) but feel free to check after using Matsy's Tut.

export PS1='\[\033[1;30m\]┌╼ \[\033[1;32m\]\u@\h\[\033[1;30m\] ╾╼ \[\033[0;34m\]\w\[\033[0;36m\]\n\[\033[1;30m\]└╼ \[\033[1;37m\]'


"All your threads are belong to /dev/null"


| 80's Terminal Keyboard Conversion | $5 Graphics Card Silence Mod Tutorial | 485KH/s R9 270X | The Smallest Ethernet Cable | Ass Pennies | My Screenfetch |

Link to comment
Share on other sites

Link to post
Share on other sites

Try this in Excel VBA

 

Run using an Excel macro or insert a button with the code below

For i = 16 To 19        'columns P to S    For j = 5 To 18     'rows 5 to 18        If (Cells(j, i) = "Voll") Then            Cells(j, i).Interior.ColorIndex = 4        End If    NextNext
Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×