Friday, August 12, 2005

Geez..that was first $50 project

Boy, maybe I should rethink this $50 thing...

Within hours of making this change, I've already received my first request, completed the project, and have sent the code to the requestor.

Jim, I hope it does exactly what you asked for. I pretty sure it does.

What Jim needed was a macro in an Excel file that would check each cell in a selected range, and color-code the text in the cell based upon these criteria:

  • If the cell contained a numeric value that's not a formula, it's red.

  • If the cell contained a numeric value that is a formula, but only because it's preceded with an equal sign, it's green.

  • If the cell contained a numeric value that is a formula with operators other than merely having an equal sign, it's blue.

Using a regular expression, the isNumeric function, some nested If_Then_Else's, and a few other things, I think I nailed it down pretty good.

Thanks for the project, Jim, and for $50.


Anonymous said...

Thanks for the link to Automate Excel.

The 50$ idea is a stroke of genius, is it trademarked yet? ;-)

Excel_Geek said...

I've been amazed by the interest it's garnered.

Unknown said...

you could probably do this with conditional formattiing too using the same functions

Unknown said...

and thanks in advance for the promised link

Excel_Geek said...

You can use regular expressions directly in formulas?