Is there a VB equivalent to the following XL formula?
Formula = CELL(info_type,reference).
I’m trying to determine if the active cell is a label or value.
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Cell Formula
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Cell Formula
- This topic has 2 replies, 3 voices, and was last updated 22 years, 5 months ago.
AuthorTopicWSjstevens
AskWoody LoungerViewing 1 reply threadAuthorReplies-
WSgwhitfield
AskWoody LoungerHi,
Any function can be coded as a worksheet functiion:
answer = Application.WorksheetFunction.CELL(info_type,reference)I’m not that’s the best way to do it- but I’m not sure what you mean by “a label or value”. You can look at things like cells(i,j).value or cells(i,j).formula- I don’t know if that’s going to achieve what you want
Geoff
-
WSTomG
AskWoody LoungerI would use the HasFormula Property. Quote below from Microsoft Help.
“True if all cells in the range contain formulas; False if none of the cells in the range contains a formula; Null otherwise. Read-only Variant.”
The sample code from help, slightly modified, with no error checking, gives the general idea how the property works.
Sub tst() Worksheets("Sheet1").Activate Set rr = Application.InputBox(prompt:="Select a range on this worksheet", Type:=8) If rr.HasFormula = True Then MsgBox "Cell(s) in the selection contains a formula" Else MsgBox "No Formula Found" End If End Sub
HTH
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Is using VPN a good idea?
by
Tex265
28 minutes ago -
How to prevent/disable Bitlocker Automatic Device Encryption?
by
EricB
50 minutes ago -
Unexplained aspects of installing the latest update of Office 2021
by
TonyC
5 hours ago -
Getting started with macOS Disk Utility: RAID, images, and repairs
by
Alex5723
7 hours, 53 minutes ago -
Getting started with macOS Disk Utility: Resizing, snapshots, and journaling
by
Alex5723
7 hours, 57 minutes ago -
Are you ready for AI?
by
Susan Bradley
1 hour, 39 minutes ago -
Windows 11 Insider Preview build 25375 released to Canary
by
joep517
10 hours, 31 minutes ago -
Windows 11 Insider Preview Build 22621.1825 and 22624.1825 released to BETA
by
joep517
10 hours, 35 minutes ago -
Duplicate image name brings up old images
by
Susan Bradley
1 day, 16 hours ago -
XP offline activation tool, xp_activate32.exe
by
Alex5723
3 hours, 58 minutes ago -
Huge Tesla leak reveals thousands of safety concerns, privacy problems
by
Alex5723
1 day, 20 hours ago -
Android : iRecorder – Screen Recorder new Android RAT
by
Alex5723
1 day, 20 hours ago -
HP has found an exciting new way to DRM your printer!
by
Alex5723
1 day, 20 hours ago -
Outlook 2019 Resend “you do not appear to be the original sender…” msg
by
Mw Ward
2 days, 11 hours ago -
Wine update?
by
bassmanzam
1 day, 11 hours ago -
Issue with \windows\servicing\LCU\Package_for_rollupFix…
by
cmar6
1 day, 18 hours ago -
Java JDK 20 – Should I install it?
by
Peobody
1 day ago -
Windows 10 won’t boot on a new motherboard
by
Paul Demmitt
1 day, 23 hours ago -
Cannot Update Win 10 to 22H2 from 21H2
by
Haifisch77
2 days, 21 hours ago -
Microsoft : Saving or copying files might intermittently fail
by
Alex5723
2 days, 17 hours ago -
Chinese Volt Typhoon hit US critical infrastructure sectors
by
Alex5723
1 day, 11 hours ago -
EFF: How to Fix the Internet-People With Disabilities Are The Original Hackers
by
Elly
2 days, 7 hours ago -
Windows 11 Insider Preview build 23466 released to DEV
by
joep517
3 days, 18 hours ago -
Cannot Un-suspend tasks
by
steven.h.lutz
3 days, 19 hours ago -
Old Hardware
by
fpefpe
3 days ago -
New ways to customize Chrome on your desktop
by
Alex5723
4 days, 4 hours ago -
Microsoft ‘killed” WinRAR and 7-zip
by
Alex5723
3 days, 15 hours ago -
Losing Wireless Identity
by
WSmmi16
1 day, 17 hours ago -
45 min for hackers to brute-force fingerprint authentication of android devices
by
Cell Phone
4 days, 17 hours ago -
Windows 11 Moments 3 coming May 24
by
Alex5723
3 days, 18 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2023 by AskWoody Tech LLC. All Rights Reserved.