Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a simple question. in VBA, how can one determine whether the
currently selected cell has a value or a formla in it? John Wirt |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
John,
Use the HasFormula property. E.g., If Range("A1").HasFormula = True Then ' cell has formula Else ' cell doesn't have formula End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "John Wirt" wrote in message ... I have a simple question. in VBA, how can one determine whether the currently selected cell has a value or a formla in it? John Wirt |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you, Chip. I will note this one for the future.
John "Chip Pearson" wrote in message ... John, Use the HasFormula property. E.g., If Range("A1").HasFormula = True Then ' cell has formula Else ' cell doesn't have formula End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "John Wirt" wrote in message ... I have a simple question. in VBA, how can one determine whether the currently selected cell has a value or a formla in it? John Wirt |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If I include this before the statement where I want to obtain the formula in
a cell, I will be able to only select when the cell contains a formula. The program will be better. John "Chip Pearson" wrote in message ... John, Use the HasFormula property. E.g., If Range("A1").HasFormula = True Then ' cell has formula Else ' cell doesn't have formula End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "John Wirt" wrote in message ... I have a simple question. in VBA, how can one determine whether the currently selected cell has a value or a formla in it? John Wirt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multiple cells or columns are selected instead of selected cell or | Excel Discussion (Misc queries) | |||
Is there a formula to show which cell is currently selected | Excel Worksheet Functions | |||
A formula for displaying the cell reference of the selected cell | Excel Discussion (Misc queries) | |||
need help with determining a formula | Excel Worksheet Functions | |||
Determining if a chart is selected | Charts and Charting in Excel |