Solved Using macro to check length of cell and return value?

February 16, 2012 at 12:27:40
Specs: Windows XP

I'm trying to use a macro to determine the length of a specific range of cells in a different worksheet and have it display only if the value is greater than 10.

As such,

I used the following:

Sheets("Raw").Range("F" & LastWorked + 1 & ":F" & LastRow).FormulaR1C1 = _

This basically goes into the 'Raw' worksheet, sets the range of cells ranging from say F12-F20 and add the following formula to it.

For some reason, this seems to return an error message..

When I enter it directly into the Cell myself, =IF(LEN(FlashReport!H78)<10,FlashReport!H78,"")

it seems to work.. is the macro formula i'm trying to use different somehow that it won't take the column and cell value properly and translate? I've used a similar one to fill the range of cells with a different formula, "=IF(ISBLANK('FlashReport'!R[0]C[2]),"""",'FlashReport'!R[0]C[2])" to return the value if it's not blank, but my LEN one doesn't seem to want to work..

If anyone has any insight on what I'm doing wrong, it'd be appreciated.



See More: Using macro to check length of cell and return value?

February 16, 2012 at 14:02:09
✔ Best Answer
Look carefully at the formula that works vs. the one that doesn't.

Specifically, look carefully at how you've coded the "" (blank cell) in one vs. the other.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •

February 16, 2012 at 14:32:19
Thanks DerbyDad03!

Yeah.. I missed the extra "" part.. I even saw it and thought it was fine. -_-

Anywho, I appreciate the assistance as always.

Report •
Related Solutions

Ask Question