Excel: Dropdown style selector -


currently using data validation select list of options cell can be. possible same thing styles? i.e. dropdown can select subset of styles apply cell?

add code change format of cells, based on value change of cell.

let's want change color of cell d2 based on value of cell b2 (both in sheet1). open vba editor, double click on "sheet1" of book in project browser , select worksheet object , change procedure, , this:

private sub worksheet_change(byval target range)     if target.address = "$b$2" ' address of cell being changed         select case target.value             case 1 ' changed cell value 1                 thisworkbook.activesheet.range("d2").interior.color = rgb(125, 125, 125)             case 2 ' changed cell value 2                 thisworkbook.activesheet.range("d2").interior.color = rgb(125, 125, 255)             case 3 ' changed cell value 3                 thisworkbook.activesheet.range("d2").interior.color = rgb(125, 0, 255)         end select     end if end sub 

you can google around find ways change other format properties of cell.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -