increase / decrease font size based on value in cell having a formula

N

noname

Hi,

I have a worksheet containing cells having text in Column A & in
Column B i have cells having formulae in them. column. Using VBA, i am
trying to increase / decrease font size of Column A text, based on the
formula value returned in Column B cell.

for each rr in rng
if rr.offset(0,1).hasformula then
rr.font.size=rr.offset(0,1).value
end if
next rr

right now, i am unable to get the value returned by the formula using
VBA. How to achieve this?
 
J

Jim Cone

Works for me. I added: Set rng = Selection.Cells
Also, those values in the next column should be numeric. Better check.
--
Jim Cone
Portland, Oregon USA
http://www.contextures.com/excel-sort-addin.html
(review of excel sorting add-in)

..
..
..

"noname" <[email protected]>
wrote in message
Hi,

I have a worksheet containing cells having text in Column A & in
Column B i have cells having formulae in them. column. Using VBA, i am
trying to increase / decrease font size of Column A text, based on the
formula value returned in Column B cell.

for each rr in rng
if rr.offset(0,1).hasformula then
rr.font.size=rr.offset(0,1).value
end if
next rr

right now, i am unable to get the value returned by the formula using
VBA. How to achieve this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top