Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
UDF to return as text
This UDF returns a Hex number. I would like it to change the cell
format to text. Thanks, Public Function DecToHex(DecNumber As Variant) As String DecToHex = Right("0" & Hex(DecNumber), 2) End Function |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
UDF to return as text
On Fri, 11 Dec 2009 13:41:40 -0800 (PST), Fan924 wrote:
This UDF returns a Hex number. I would like it to change the cell format to text. Thanks, Public Function DecToHex(DecNumber As Variant) As String DecToHex = Right("0" & Hex(DecNumber), 2) End Function A Function can only return a value. It cannot change the environment. --ron |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
UDF to return as text
A Function can only return a value. *It cannot change the environment.
--ron Ok, thanks. That explains why nothing I tried worked. :) |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
UDF to return as text
Maybe this:
=TEXT(A1, "0") HTH, Ryan--- -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. "Ron Rosenfeld" wrote: On Fri, 11 Dec 2009 13:41:40 -0800 (PST), Fan924 wrote: This UDF returns a Hex number. I would like it to change the cell format to text. Thanks, Public Function DecToHex(DecNumber As Variant) As String DecToHex = Right("0" & Hex(DecNumber), 2) End Function A Function can only return a value. It cannot change the environment. --ron . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
UDF to return as text
On Fri, 11 Dec 2009 14:04:25 -0800 (PST), Fan924 wrote:
A Function can only return a value. *It cannot change the environment. --ron Ok, thanks. That explains why nothing I tried worked. :) Perhaps with more information, someone might devise a solution to your problem. --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Return Text based upon text matching | Excel Worksheet Functions | |||
Nested formula to search a text string and return specific text | Excel Worksheet Functions | |||
2 criteria lookup of text. Return text form column 3. SUMPRODUCT t | Excel Worksheet Functions | |||
When I hit return in a multiline text box, focus goes to next text | Excel Programming | |||
lookup a text cell and return text | Excel Discussion (Misc queries) |