Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default Choose Font In A Formula

Is there anyway to form a result in Wingdings if Yes, else in normal/standard
text.
For example I want the result to be reflecting the Checkmark Symbol (242) of
Wingdings if =A1=B1, else if =A1<B1 the Cross Symbol (241) of Wingdings, and
finally in case of =OR(A1=0,B1=0) the result being in default Times New Roman
"Incomplete Data".

Your expert advice is sought and shall be obliged. Thanx in advance.

--

Best Regards,
FARAZ A. QURESHI
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Choose Font In A Formula

A formula returns a result - it can't affect the font that is used in
the cell.

Hope this helps.

Pete

On Feb 2, 12:24*pm, FARAZ QURESHI
wrote:
Is there anyway to form a result in Wingdings if Yes, else in normal/standard
text.
For example I want the result to be reflecting the Checkmark Symbol (242) of
Wingdings if =A1=B1, else if =A1<B1 the Cross Symbol (241) of Wingdings, and
finally in case of =OR(A1=0,B1=0) the result being in default Times New Roman
"Incomplete Data".

Your expert advice is sought and shall be obliged. Thanx in advance.

--

Best Regards,
FARAZ A. QURESHI


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Choose Font In A Formula

Enter this formula in the result cell:
=IF(OR(A1=0,B1=0),"Incomplete Data",CHAR(IF(A1=B1,241,242)))

and install this event sub:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 1 And Target.Column <= 2 Then
Range("C1").Font.Name = _
IIf(Range("A1") = 0 Or Range("B1") = 0, "Times New Roman",
"Wingdings")
End If
End Sub

Regards,
Stefi


€˛FARAZ QURESHI€¯ ezt Ć*rta:

Is there anyway to form a result in Wingdings if Yes, else in normal/standard
text.
For example I want the result to be reflecting the Checkmark Symbol (242) of
Wingdings if =A1=B1, else if =A1<B1 the Cross Symbol (241) of Wingdings, and
finally in case of =OR(A1=0,B1=0) the result being in default Times New Roman
"Incomplete Data".

Your expert advice is sought and shall be obliged. Thanx in advance.

--

Best Regards,
FARAZ A. QURESHI

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Choose Font In A Formula

Check char codes for Checkmark Symbol and Cross Symbol! In my Excel 2003 241
and 242 are emmpty up and down arrows!
Stefi


€˛Stefi€¯ ezt Ć*rta:

Enter this formula in the result cell:
=IF(OR(A1=0,B1=0),"Incomplete Data",CHAR(IF(A1=B1,241,242)))

and install this event sub:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 1 And Target.Column <= 2 Then
Range("C1").Font.Name = _
IIf(Range("A1") = 0 Or Range("B1") = 0, "Times New Roman",
"Wingdings")
End If
End Sub

Regards,
Stefi


€˛FARAZ QURESHI€¯ ezt Ć*rta:

Is there anyway to form a result in Wingdings if Yes, else in normal/standard
text.
For example I want the result to be reflecting the Checkmark Symbol (242) of
Wingdings if =A1=B1, else if =A1<B1 the Cross Symbol (241) of Wingdings, and
finally in case of =OR(A1=0,B1=0) the result being in default Times New Roman
"Incomplete Data".

Your expert advice is sought and shall be obliged. Thanx in advance.

--

Best Regards,
FARAZ A. QURESHI

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default Choose Font In A Formula

You are quite right the codes are actually 251 & 252. Thanx!
--

Best Regards,
FARAZ A. QURESHI


"Stefi" wrote:

Check char codes for Checkmark Symbol and Cross Symbol! In my Excel 2003 241
and 242 are emmpty up and down arrows!
Stefi


€˛Stefi€¯ ezt Ć*rta:

Enter this formula in the result cell:
=IF(OR(A1=0,B1=0),"Incomplete Data",CHAR(IF(A1=B1,241,242)))

and install this event sub:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 1 And Target.Column <= 2 Then
Range("C1").Font.Name = _
IIf(Range("A1") = 0 Or Range("B1") = 0, "Times New Roman",
"Wingdings")
End If
End Sub

Regards,
Stefi


€˛FARAZ QURESHI€¯ ezt Ć*rta:

Is there anyway to form a result in Wingdings if Yes, else in normal/standard
text.
For example I want the result to be reflecting the Checkmark Symbol (242) of
Wingdings if =A1=B1, else if =A1<B1 the Cross Symbol (241) of Wingdings, and
finally in case of =OR(A1=0,B1=0) the result being in default Times New Roman
"Incomplete Data".

Your expert advice is sought and shall be obliged. Thanx in advance.

--

Best Regards,
FARAZ A. QURESHI



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default Choose Font In A Formula

I copied and pasted the code in the VBA module (Alt+F11) but upon pressing
F5/pushing the run button the empty macro box appears, and upon changing the
data in A1 or A2 doesn't execute the code. Any idea?
--

Best Regards,
FARAZ A. QURESHI


"Stefi" wrote:

Check char codes for Checkmark Symbol and Cross Symbol! In my Excel 2003 241
and 242 are emmpty up and down arrows!
Stefi


€˛Stefi€¯ ezt Ć*rta:

Enter this formula in the result cell:
=IF(OR(A1=0,B1=0),"Incomplete Data",CHAR(IF(A1=B1,241,242)))

and install this event sub:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 1 And Target.Column <= 2 Then
Range("C1").Font.Name = _
IIf(Range("A1") = 0 Or Range("B1") = 0, "Times New Roman",
"Wingdings")
End If
End Sub

Regards,
Stefi


€˛FARAZ QURESHI€¯ ezt Ć*rta:

Is there anyway to form a result in Wingdings if Yes, else in normal/standard
text.
For example I want the result to be reflecting the Checkmark Symbol (242) of
Wingdings if =A1=B1, else if =A1<B1 the Cross Symbol (241) of Wingdings, and
finally in case of =OR(A1=0,B1=0) the result being in default Times New Roman
"Incomplete Data".

Your expert advice is sought and shall be obliged. Thanx in advance.

--

Best Regards,
FARAZ A. QURESHI

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Choose Font In A Formula

You don't mention that the solution suits your needs or not!
Stefi


€˛FARAZ QURESHI€¯ ezt Ć*rta:

You are quite right the codes are actually 251 & 252. Thanx!
--

Best Regards,
FARAZ A. QURESHI


"Stefi" wrote:

Check char codes for Checkmark Symbol and Cross Symbol! In my Excel 2003 241
and 242 are emmpty up and down arrows!
Stefi


€˛Stefi€¯ ezt Ć*rta:

Enter this formula in the result cell:
=IF(OR(A1=0,B1=0),"Incomplete Data",CHAR(IF(A1=B1,241,242)))

and install this event sub:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 1 And Target.Column <= 2 Then
Range("C1").Font.Name = _
IIf(Range("A1") = 0 Or Range("B1") = 0, "Times New Roman",
"Wingdings")
End If
End Sub

Regards,
Stefi


€˛FARAZ QURESHI€¯ ezt Ć*rta:

Is there anyway to form a result in Wingdings if Yes, else in normal/standard
text.
For example I want the result to be reflecting the Checkmark Symbol (242) of
Wingdings if =A1=B1, else if =A1<B1 the Cross Symbol (241) of Wingdings, and
finally in case of =OR(A1=0,B1=0) the result being in default Times New Roman
"Incomplete Data".

Your expert advice is sought and shall be obliged. Thanx in advance.

--

Best Regards,
FARAZ A. QURESHI

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Choose Font In A Formula

1. Copy the code into the sheet module, not a general module.

2. The code runs upon an event, not manually.

3. Since you are running off a calculated cell use this instead.

Private Sub Worksheet_Calculate()
Range("C1").Font.Name = _
IIf(Range("A1") = 0 Or Range("B1") = 0, "Times New Roman", _
"Wingdings")
End Sub

Right-click on the sheet tab and "View Code". Copy/paste into that module.

Assumes the formula

=IF(OR(A1=0,B1=0),"Incomplete Data",CHAR(IF(A1<B1,251,252)))

is entered in C1


Gord Dibben MS Excel MVP


On Mon, 2 Feb 2009 06:19:01 -0800, FARAZ QURESHI
wrote:

I copied and pasted the code in the VBA module (Alt+F11) but upon pressing
F5/pushing the run button the empty macro box appears, and upon changing the
data in A1 or A2 doesn't execute the code. Any idea?


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
Looking for a formula to choose one date or another michelledean via OfficeKB.com Excel Discussion (Misc queries) 2 December 8th 07 04:47 PM
choose match formula Scott@CW Excel Discussion (Misc queries) 2 September 5th 07 08:58 PM
formula to choose a hyperlink from a cell Luong Vinh Tu Excel Worksheet Functions 1 September 25th 06 04:13 AM
How to indicate in formula to choose the entire column starting from a specified cell? [email protected] Excel Discussion (Misc queries) 3 June 13th 06 04:25 AM
Choose between two cells the lower result of a formula Michael Zullo via OfficeKB.com Excel Worksheet Functions 4 May 31st 05 07:25 AM


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

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"