Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cell has the following formula
=DEC2HEX((I28-H28)/40) The output is a hecidecimal A. I would like it to be 0A. Hex numbers vary from 00 to FFand I neee help wiith the formatting. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As long as your hexadecimal values will only be 1 or 2 hex digits long...
=RIGHT("0"&DEC2HEX((I28-H28)/40),2) -- Rick (MVP - Excel) "Fan924" wrote in message ... Cell has the following formula =DEC2HEX((I28-H28)/40) The output is a hecidecimal A. I would like it to be 0A. Hex numbers vary from 00 to FFand I neee help wiith the formatting. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Sat, 7 Feb 2009 17:16:12 -0800 (PST), Fan924 wrote:
Cell has the following formula =DEC2HEX((I28-H28)/40) The output is a hecidecimal A. I would like it to be 0A. Hex numbers vary from 00 to FFand I neee help wiith the formatting. Did you check HELP for the function? That is what the optional [places] argument is for. =DEC2HEX((I28-H28)/40,2) --ron |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
He-he... obviously I didn't. <g
-- Rick (MVP - Excel) "Ron Rosenfeld" wrote in message ... On Sat, 7 Feb 2009 17:16:12 -0800 (PST), Fan924 wrote: Cell has the following formula =DEC2HEX((I28-H28)/40) The output is a hecidecimal A. I would like it to be 0A. Hex numbers vary from 00 to FFand I neee help wiith the formatting. Did you check HELP for the function? That is what the optional [places] argument is for. =DEC2HEX((I28-H28)/40,2) --ron |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Sun, 8 Feb 2009 09:53:08 -0500, "Rick Rothstein"
wrote: He-he... obviously I didn't. <g Sorry. I had addressed my comment to the OP. It looks as if it is threaded that way on my news reader (Agent). Maybe it looks different on yours? --ron |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No apology necessary, you didn't do anything wrong. I know you addressed
your comment to the OP... my comment wasn't responding to your statement as if you had addressed it to me... I was just noting that obviously I didn't look up the function in the help files either (obvious from the fact that I posted a more involved "RIGHT function with concatenation" solution that didn't use the available optional argument... I thought that was kind of funny. I don't have any occasion to use Hex/Decimal conversions, so I just went with what the OP posted (assuming there was no built-in way of specifying digits because he didn't use any) and posted my solution without looking the function up for myself. I'm glad you came along and showed the OP the correct way to solve his problem. -- Rick (MVP - Excel) "Ron Rosenfeld" wrote in message ... On Sun, 8 Feb 2009 09:53:08 -0500, "Rick Rothstein" wrote: He-he... obviously I didn't. <g Sorry. I had addressed my comment to the OP. It looks as if it is threaded that way on my news reader (Agent). Maybe it looks different on yours? --ron |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Sun, 8 Feb 2009 12:21:00 -0500, "Rick Rothstein"
wrote: No apology necessary, you didn't do anything wrong. I know you addressed your comment to the OP... my comment wasn't responding to your statement as if you had addressed it to me... I was just noting that obviously I didn't look up the function in the help files either (obvious from the fact that I posted a more involved "RIGHT function with concatenation" solution that didn't use the available optional argument... I thought that was kind of funny. I don't have any occasion to use Hex/Decimal conversions, so I just went with what the OP posted (assuming there was no built-in way of specifying digits because he didn't use any) and posted my solution without looking the function up for myself. I'm glad you came along and showed the OP the correct way to solve his problem. -- Rick (MVP - Excel) Ah. Now I see. When I posted my comment, I had not seen yours. And even after, I didn't look at yours more closely. I just glanced at it and, seeing the ...,2), I just quickly jumped to the conclusion that the "2" was the optional argument for the dec2hex function, and completely missed that it was the numchars argument for the right function. Just goes to show how my bias affected what I saw. --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formatting Output Range in Combo Box | Excel Discussion (Misc queries) | |||
Formatting text output within formulas | Excel Worksheet Functions | |||
conditional formatting w/ color as input vs output | Excel Worksheet Functions | |||
Pivot Output formatting. | Excel Programming | |||
Formatting equation output | Excel Programming |