Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8600461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:37:20+00:00 2026-06-12T01:37:20+00:00

How to return comment as a cell from a conditional. Example: =if(a1=0;insert comment on

  • 0

How to return comment as a cell from a conditional.

Example:

=if(a1=0;insert comment on cell)

insert comment and show comment

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:37:21+00:00Added an answer on June 12, 2026 at 1:37 am

    I could not find any way with default worksheet functions, so you might have to declare your own function for this – like this:

    Public Function GetComment(rng As Range) as String
      GetComment = rng.NoteText
     'also possible
     'GetComment = rng.Comment.Text
    End Function
    

    Save this function into a Module, so it is accessible as a worksheetfunction.

    then use =if(a1=0;GetComment(A1)) to return the comment.

    edit:

    Because I might have misunderstood a bit – here is a verison, which adds a comment to the caller-cell, sets its content to the given comment and makes the comment visible.

    Public Function AddCmt(strComment As String) As String
      Dim rngCaller As Range
      If TypeName(Application.Caller) Like "Range" Then
        Set rngCaller = Application.Caller
        With rngCaller
          If .Comment Is Nothing Then
            .AddComment (strComment)
          Else
            .Comment.Text strComment
          End If
          .Comment.Visible = True
        End With
        'set caller-cell content to given comment
        AddCmt= strComment
      End If
    End Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to save output from this script to a file based on a cell
I am trying to come up with a query that will return comments following
I expect this FQL query to return a non-empty array, because there are comments
I would like to find all comment blocks(/*...*/) but the function g_regex_match_full always returns
I want to fetch a method's comments,take below method for example: /** * Returns
SELECT user_id, created FROM photo_comments GROUP BY user_id returns user_id created 1 2009-10-20 21:08:22
return false seems to work in the submitHandler but I'm not sure why. function
return Fluently.Configure() .Database(MsSqlConfiguration.MsSql2008 .ConnectionString(c => c .Database(Database) .TrustedConnection() .Server(Server) ).ShowSql()) .ExposeConfiguration(c => c.SetProperty(current_session_context_class, web))
Return Successful Dim user = ravi Dim pass = admin objcmd.CommandText = Select *
return false; for form submission is working for the rest of my code, just

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.