Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Function to detect type of cell contents

Is there a formula or function that I can use that will tell me if a cell's
contents contain plain text or number that is input, or if it is a formula
that is generating the results.

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Function to detect type of cell contents

This user defined function will do the job:
Function Whattype(mycell)
If mycell.HasFormula Then
Whattype = "Formula"
Else
Whattype = "Input"
End If
End Function

Call it with =Whattype(a1)
If you are unfamiliar with VBA see David McRitchie's site on "getting
started" with VBA
http://www.mvps.org/dmcritchie/excel/getstarted.htm
But feel free to return here with more questions , or contact me direct
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Mark" wrote in message
et...
Is there a formula or function that I can use that will tell me if a
cell's contents contain plain text or number that is input, or if it is a
formula that is generating the results.

Thanks




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Function to detect type of cell contents

Bernard, thanks for this. I would need this to check a series of cells in a
column. How do I include that logic? I am new to VBA but willing to learn.
Mark
"Bernard Liengme" wrote in message
...
This user defined function will do the job:
Function Whattype(mycell)
If mycell.HasFormula Then
Whattype = "Formula"
Else
Whattype = "Input"
End If
End Function

Call it with =Whattype(a1)
If you are unfamiliar with VBA see David McRitchie's site on "getting
started" with VBA
http://www.mvps.org/dmcritchie/excel/getstarted.htm
But feel free to return here with more questions , or contact me direct
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Mark" wrote in message
et...
Is there a formula or function that I can use that will tell me if a
cell's contents contain plain text or number that is input, or if it is a
formula that is generating the results.

Thanks






  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Function to detect type of cell contents

Copy the formula down the column
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Mark" wrote in message
t...
Bernard, thanks for this. I would need this to check a series of cells in
a column. How do I include that logic? I am new to VBA but willing to
learn.
Mark
"Bernard Liengme" wrote in message
...
This user defined function will do the job:
Function Whattype(mycell)
If mycell.HasFormula Then
Whattype = "Formula"
Else
Whattype = "Input"
End If
End Function

Call it with =Whattype(a1)
If you are unfamiliar with VBA see David McRitchie's site on "getting
started" with VBA
http://www.mvps.org/dmcritchie/excel/getstarted.htm
But feel free to return here with more questions , or contact me direct
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Mark" wrote in message
et...
Is there a formula or function that I can use that will tell me if a
cell's contents contain plain text or number that is input, or if it is
a formula that is generating the results.

Thanks








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
function to display contents of a cell Ronald Excel Worksheet Functions 2 January 18th 07 07:51 PM
A challenge: referencing cell contents in nested function formula Needs Assistance Excel Worksheet Functions 3 October 28th 06 02:17 AM
Need some comments on my Utility_Move class module. jchen Excel Worksheet Functions 0 August 21st 06 07:05 PM
What worksheet function will formatlessly copy cell contents? MargueriteL Excel Worksheet Functions 1 June 7th 05 04:16 AM
How can I shift cell range contents by using a function? spydog27 Excel Worksheet Functions 1 December 23rd 04 08:40 AM


All times are GMT +1. The time now is 06:59 AM.

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"