Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Excel, Hash (#) in VBA Calculations

Hi Folks,

I have recently inherited care of an Excel XP model that contains the
following calculations, containing the # symbol.

Amount = Amount / 100#
NewValue = OldValue * -1#

I can see where the variables Amount, NewValue and Old Value are declared
but nothing on the #.

The end results sor t of make sense if the # symbols were in fact the %
sign. Other than that I am totally confused.

Does this use of the # symbol make sense to anyone.

TIA

John Howard
Sydney, Australia


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Excel, Hash (#) in VBA Calculations

It is whats referred to as a Type Declaration Character.

It means that when the expression is evaluated, the number in front of the
type declaration character is treated as a specific data type instead of as
a Variant.

The type-declaration character for Double is the number sign (#).

The list of type declaration characters a
Integer %
Long &
Currency @
Single !
Double #
String $

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"SMS - John Howard" wrote in message
...
Hi Folks,

I have recently inherited care of an Excel XP model that contains the
following calculations, containing the # symbol.

Amount = Amount / 100#
NewValue = OldValue * -1#

I can see where the variables Amount, NewValue and Old Value are declared
but nothing on the #.

The end results sor t of make sense if the # symbols were in fact the %
sign. Other than that I am totally confused.

Does this use of the # symbol make sense to anyone.

TIA

John Howard
Sydney, Australia




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Excel, Hash (#) in VBA Calculations

Rob,
Many thanks.
That certainly makes sense and puts everythng in place

Best regards

John

"Rob van Gelder" wrote in message
...
It is whats referred to as a Type Declaration Character.

It means that when the expression is evaluated, the number in front of the
type declaration character is treated as a specific data type instead of

as
a Variant.

The type-declaration character for Double is the number sign (#).

The list of type declaration characters a
Integer %
Long &
Currency @
Single !
Double #
String $

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"SMS - John Howard" wrote in message
...
Hi Folks,

I have recently inherited care of an Excel XP model that contains the
following calculations, containing the # symbol.

Amount = Amount / 100#
NewValue = OldValue * -1#

I can see where the variables Amount, NewValue and Old Value are

declared
but nothing on the #.

The end results sor t of make sense if the # symbols were in fact the %
sign. Other than that I am totally confused.

Does this use of the # symbol make sense to anyone.

TIA

John Howard
Sydney, Australia






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
Are hash tables in Excel possible? Mahurshi Akilla Excel Discussion (Misc queries) 4 May 10th 23 07:44 PM
Hash (MD5) in Excel Stephen Bullen[_3_] Excel Programming 2 January 29th 16 12:56 AM
Excel cell shows and prints as hash marks (#) Phil Mead Excel Discussion (Misc queries) 3 December 3rd 09 03:15 PM
how to create a psuedo hash in excel nlscb New Users to Excel 0 January 20th 05 03:07 AM
Hash (MD5) in Excel Tom Ogilvy Excel Programming 0 February 5th 04 03:20 PM


All times are GMT +1. The time now is 09:45 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"