ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Programming with symbols (https://www.excelbanter.com/excel-programming/340827-programming-symbols.html)

maleck

Programming with symbols
 

Hi folks, I have a very easy doubt and I would like your advice. I pla
to do something like this using MS Excel :

if the cell “A1” is equal to or greater than the number “12”, then th
cell “C1” is equal to the cell “D1”

but “D1” is a cell that contains a symbol or a drawing character. Fo
example : the letter “e” in format TIMES NEW ROMAN is the same a
“epsilon” (greek letter) in format SYMBOL

Could anyone help? If it is necessary to use Visual Basic, where shoul
I click and what steps should I make? Thanks a lot

--
malec
-----------------------------------------------------------------------
maleck's Profile: http://www.excelforum.com/member.php...fo&userid=2747
View this thread: http://www.excelforum.com/showthread.php?threadid=46985


tkaplan[_6_]

Programming with symbols
 

in c1 put: =if(a1=12,d1,"")

then format the column c to be the font that you want the symbols to b
in

--
tkapla
-----------------------------------------------------------------------
tkaplan's Profile: http://www.excelforum.com/member.php...fo&userid=2298
View this thread: http://www.excelforum.com/showthread.php?threadid=46985


moondark[_3_]

Programming with symbols
 

Ok, first you've got to create a CommandButton to execute the VBA-Code.
Unfortunately I only know the german version of MS Excel so you'll hav
to search for it on your own. It's probably a window called "tools".
After adding the Commandbutton open the VBA Editor, pressing ALT+F11
Now paste the following code

Code
-------------------
Private Sub CommandButton1_Click()
If Cells(1, 1) = 12 Then
Cells(1, 3) = Cells(1, 4) 'transferring content

With Cells(1, 3).Font 'and format
.Name = Cells(1, 4).Font.Name
.Size = Cells(1, 4).Font.Size
.Strikethrough = Cells(1, 4).Font.Strikethrough
.Superscript = Cells(1, 4).Font.Superscript
.Subscript = Cells(1, 4).Font.Subscript
.OutlineFont = Cells(1, 4).Font.OutlineFont
.Shadow = Cells(1, 4).Font.Shadow
.Underline = Cells(1, 4).Font.Underline
.ColorIndex = Cells(1, 4).Font.ColorIndex
End With

End If
End Sub

-------------------

this code checks if Cell A1 has a value = 12
in case it's true, it transfers the value of cell D1 to C1 and al
values according to the font property such as font-family and size an
color a.s.o.
if A1 is <12 or empty it does nothing

Good luck searching the tools-window ;)

Simo

--
moondar
-----------------------------------------------------------------------
moondark's Profile: http://www.excelforum.com/member.php...fo&userid=2739
View this thread: http://www.excelforum.com/showthread.php?threadid=46985


maleck[_2_]

Programming with symbols
 

Great posts Moondark (Simon) and Tkaplan !

The kind of answers that trully help ! Thanks a lot for your time
Different ways of dealing with the problem. Just great.

Cheers,
Malec

--
malec
-----------------------------------------------------------------------
maleck's Profile: http://www.excelforum.com/member.php...fo&userid=2747
View this thread: http://www.excelforum.com/showthread.php?threadid=46985



All times are GMT +1. The time now is 05:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com