LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,574
Default getformula UDF

I have the following code as a UDF which allows you to display the formula
for a referenced cell:

Function GetFormula(Cell As Range) As String
GetFormula = Cell.Formula
End Function

So, if A1 has as its formula =2+3, and I enter into B1 =getformula(A1), =2+3
is shown.

All well and good.

However, I have a number of cells formatted as times (8:30AM, etc.) and,
when I use =getformula(cell) on them, strange numbers return: .354166666...

Ideas? Does this have to do with 8:30AM being 35.4% of a complete day?
 
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
how to use GETFORMULA() in EXCEL 2003? romelsb Excel Worksheet Functions 2 November 1st 06 09:16 AM
array formulas and getformula UDF Dave F Excel Worksheet Functions 8 August 10th 06 09:32 PM
GetFormula function- Need help showing formulas only- [email protected] Excel Worksheet Functions 2 January 9th 06 02:52 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"