Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default increase / decrease font size based on value in cell having a formula

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default increase / decrease font size based on value in cell having a formula


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"
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?
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,045
Default increase / decrease font size based on value in cell having a formula

On Fri, 15 Oct 2010 14:08:05 -0700 (PDT), noname
wrote:

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?


The snippet you post should work, depending on the rest of the code
and the contents of rr.offset(0,1).

So, what is the rest of the code?
What is the actual contents of rr.offset(0,1)?
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Picture size increase/decrease in size using code JohnUK Excel Programming 2 December 6th 09 11:00 PM
**Increase Font Size for Selected Cell** Shazi Excel Programming 2 July 15th 08 12:00 PM
Number in cell increase with increase in font size. Value increases with increase in font.[_2_] Excel Discussion (Misc queries) 2 August 9th 07 01:58 PM
Increase font size within my formula bar Dean[_8_] Excel Programming 13 February 20th 07 05:44 AM
How do I increase the font size in a cell validation list? Brad Phelps Excel Discussion (Misc queries) 2 August 10th 06 01:00 AM


All times are GMT +1. The time now is 09:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"