?
Solved

Populating comment in Excel with results from VBlookup

Posted on 2014-09-24
4
Medium Priority
?
92 Views
Last Modified: 2014-09-24
Experts,

Attached is a sample spreadsheet that I am trying to populate the comment with the results from a vlookup.  Can someone assist me.  

The question was answered in Question 28515631 but I cannot follow what is being done.  Can someone apply to attached spreadsheet that would really help.
0
Comment
Question by:morinia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 19

Expert Comment

by:Montoya
ID: 40342587
spreadsheet is missing : )
0
 

Author Comment

by:morinia
ID: 40342601
Sorry,

I atached and forgot to upload.  Here is the file.  It is xlsx.
vlookup.xlsx
0
 
LVL 19

Accepted Solution

by:
Montoya earned 2000 total points
ID: 40342616
0
 

Author Comment

by:morinia
ID: 40342857
I can get the first example to work.

Sub MakeComment()
    With Worksheets(1).Range("A2").AddComment
        .Visible = True
        .Text [F2].Value
    End With
End Sub



I am having a problem with this one which would loop.  i would like to populate comments in  A2 to  A7 with the values in F2 to F7.  How would I code below to do that.


   Sub ValueToComment()
    Dim rCell As Range
    For Each rCell In Selection
        With rCell
            If .HasFormula Then
                On Error Resume Next
                .Comment.Delete
                On Error GoTo 0
                .AddComment
                .Comment.Text Text:=CStr(rCell.Value)
            End If
        End With
    Next
    Set rCell = Nothing
End Sub
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question