Move Colored Cell Contents on the top of excel file?

Home » Software » Move Colored Cell Contents on the top of excel file?
Software No Comments

I need a macro that looks at cell color of lets say column A, and if it is red, it moves entire row to top of page.
At end I want all rows with Red color cells on the top of worrksheet and one without color at bottom.

Any help will be appreciated.

Best Answer:

Irene: a few things you need to know first.

1) something that moves will always (ALWAYS) just keep moving, until something else causes it to change… like stop.

2) the Earth is round (you possibly already knew this… probably, even)

3) if you fire a cannonball off a mountain horizontally… the FASTER you shoot it, the farther downrange it will go.

4) if you shoot that cannonball fast enough, eventually it will fall at the same rate that the Earth curves away from it… in other words, so long as air friction doesn't make it slow down, it will "fall" all the way around the world in orbit.

5) no air friction above a 100miles or so.

see? no propellers needed. (you can keep the one on your hat.)

Other answer:

Irene:
No need for VBA. In excel 2007 you can sort on cell colour.

Under the "Data" ribbon tab, Sort
Sort by (Column A)
Sort on (cell colour)
Order (select the colour you want on top)

garbo7441:
While you can sort by color if the cell fill color has been applied manually, you cannot sort by color if the cell fill color has been applied by conditional formatting. Are your filled cells the result of conditional formatting? If so, you will have to use a macro to reposition the rows.
dipali:
Under the "Data" ribbon tab, Sort
Sort by (Column A)
Sort on (cell colour)
Deborah:
yes, you can. you move the mouse to the toonbar on excel window and click on "fill". the color on cell will change

LEAVE A COMMENT