Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Is it possible to assign fonts using formular?

I have a formular:
=REPT("|",(VLOOKUP($E$4,SummaryTable,6,FALSE)/200))& " " &
VLOOKUP($E$4,SummaryTable,6,FALSE)

but I need to change the font of the 2nd
"VLOOKUP($E$4,SummaryTable,6,FALSE)" section.
Is this possible to do?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Is it possible to assign fonts using formular?

A formula can only return a result to the cell. It cannot modify
anything else, including formatting. If you manually format part of a
cell's content, that formatting will be deleted when the formula is
recalculated.

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]



On Tue, 2 Feb 2010 13:52:01 -0800, Ayo
wrote:

I have a formular:
=REPT("|",(VLOOKUP($E$4,SummaryTable,6,FALSE)/200))& " " &
VLOOKUP($E$4,SummaryTable,6,FALSE)

but I need to change the font of the 2nd
"VLOOKUP($E$4,SummaryTable,6,FALSE)" section.
Is this possible to do?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Is it possible to assign fonts using formular?

Check your other post, too.

Ayo wrote:

I have a formular:
=REPT("|",(VLOOKUP($E$4,SummaryTable,6,FALSE)/200))& " " &
VLOOKUP($E$4,SummaryTable,6,FALSE)

but I need to change the font of the 2nd
"VLOOKUP($E$4,SummaryTable,6,FALSE)" section.
Is this possible to do?


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Is it possible to assign fonts using formular?

Can I code a script that will, based on a selected value, format a
cell, and then fill it with a result of another cell's lookup value,
carrying the font that the code assigned based on the selected "font
choice"?

Then, my next selection would run the code again, so the code would
have to have several formatting modules that get called by the selected
drop down list value, and that value would get tested for each time the
drop down changes.

That way, I can have a result cell, that has a variable font by way of
one choice, and a variable value by way of another.

Is this possible? It should be a mere formatting script that I copy
and repeat several times, renaming each sub-module and pointing each at a
different font to be made available.



On Tue, 02 Feb 2010 16:11:25 -0600, Chip Pearson
wrote:

A formula can only return a result to the cell. It cannot modify
anything else, including formatting. If you manually format part of a
cell's content, that formatting will be deleted when the formula is
recalculated.

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]



On Tue, 2 Feb 2010 13:52:01 -0800, Ayo
wrote:

I have a formular:
=REPT("|",(VLOOKUP($E$4,SummaryTable,6,FALSE)/200))& " " &
VLOOKUP($E$4,SummaryTable,6,FALSE)

but I need to change the font of the 2nd
"VLOOKUP($E$4,SummaryTable,6,FALSE)" section.
Is this possible to do?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Is it possible to assign fonts using VB code?

On Mon, 12 Apr 2010 12:58:00 -0700, Copacetic
wrote:

Can I code a script that will, based on a selected value, format a
cell, and then fill it with a result of another cell's lookup value,
carrying the font that the code assigned based on the selected "font
choice"?

Then, my next selection would run the code again, so the code would
have to have several formatting modules that get called by the selected
drop down list value, and that value would get tested for each time the
drop down changes.

That way, I can have a result cell, that has a variable font by way of
one choice, and a variable value by way of another.

Is this possible? It should be a mere formatting script that I copy
and repeat several times, renaming each sub-module and pointing each at a
different font to be made available.



On Tue, 02 Feb 2010 16:11:25 -0600, Chip Pearson
wrote:

A formula can only return a result to the cell. It cannot modify
anything else, including formatting. If you manually format part of a
cell's content, that formatting will be deleted when the formula is
recalculated.

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]



On Tue, 2 Feb 2010 13:52:01 -0800, Ayo
wrote:

I have a formular:
=REPT("|",(VLOOKUP($E$4,SummaryTable,6,FALSE)/200))& " " &
VLOOKUP($E$4,SummaryTable,6,FALSE)

but I need to change the font of the 2nd
"VLOOKUP($E$4,SummaryTable,6,FALSE)" section.
Is this possible to do?



Had to re-post this as a new post since a lot of folks do not look at a
response to a post.

Any thoughts on the topic, folks?


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Is it possible to assign fonts using VB code?

Not sure what you are asking, but see if this gets you pointed in the right
direction.

Sub WTTwo() 'Displays each letter with different font and color
diagonally
Dim MyValue, MyString
MyString = "WATCHTHIS"
fnt = Array("Algerian", "Kristen ITC", "Comic Sans MS", "Forte",
"Jokerman", "Colonna MT", "Book Antigua", "Broadway", "Chiller", "Playbill",
"Georgia", "Mistral", "Bauhaus 93", "Eras Bold ITC")
counter = 1
Do
Randomize
MyValue = Int((13 * Rnd) + 1)
If counter <= 5 Then
Cells(counter + 1, counter + 3).Font.Name = fnt(MyValue)
Cells(counter + 1, counter + 3).Font.Size = (counter * 2) +
28
Cells(counter + 1, counter + 3).Font.ColorIndex = (counter *
2) + 4
Cells(counter + 1, counter + 3) = Mid(MyString, counter, 1)
End If
If counter = 6 Then
Cells(counter - 3, counter + 2).Font.Name = fnt(MyValue)
Cells(counter - 3, counter + 2).Font.Size = (counter * 2) +
28
Cells(counter - 3, counter + 2).Font.ColorIndex = (counter *
3) + 15
Cells(counter - 3, counter + 2) = Mid(MyString, counter, 1)
End If
counter = counter + 1
Beep
'HalfSecDly '<<<separate function not included
Loop Until counter = 10
PauseTime
End Sub



"Copacetic" wrote in message
...
On Mon, 12 Apr 2010 12:58:00 -0700, Copacetic
wrote:

Can I code a script that will, based on a selected value, format a
cell, and then fill it with a result of another cell's lookup value,
carrying the font that the code assigned based on the selected "font
choice"?

Then, my next selection would run the code again, so the code would
have to have several formatting modules that get called by the selected
drop down list value, and that value would get tested for each time the
drop down changes.

That way, I can have a result cell, that has a variable font by way of
one choice, and a variable value by way of another.

Is this possible? It should be a mere formatting script that I copy
and repeat several times, renaming each sub-module and pointing each at a
different font to be made available.



On Tue, 02 Feb 2010 16:11:25 -0600, Chip Pearson
wrote:

A formula can only return a result to the cell. It cannot modify
anything else, including formatting. If you manually format part of a
cell's content, that formatting will be deleted when the formula is
recalculated.

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]



On Tue, 2 Feb 2010 13:52:01 -0800, Ayo
wrote:

I have a formular:
=REPT("|",(VLOOKUP($E$4,SummaryTable,6,FALSE )/200))& " " &
VLOOKUP($E$4,SummaryTable,6,FALSE)

but I need to change the font of the 2nd
"VLOOKUP($E$4,SummaryTable,6,FALSE)" section.
Is this possible to do?



Had to re-post this as a new post since a lot of folks do not look at a
response to a post.

Any thoughts on the topic, folks?



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
formular Rolf Excel Worksheet Functions 0 February 19th 10 01:50 AM
another formular help please coltheplumb Excel Discussion (Misc queries) 2 September 10th 09 01:08 PM
Formular Kanmi Excel Worksheet Functions 0 August 27th 09 09:29 PM
If formular Therese Excel Discussion (Misc queries) 5 March 30th 06 11:49 PM
How can I lengthen the drop down Fonts list to show more fonts at Moser D Excel Discussion (Misc queries) 1 February 5th 06 03:24 PM


All times are GMT +1. The time now is 09:02 PM.

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

About Us

"It's about Microsoft Excel"