Solved

Populating comment in Excel with results from VBlookup

Posted on 2014-09-24
4
76 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
  • 2
  • 2
4 Comments
 
LVL 19

Expert Comment

by:Iammontoya
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:
Iammontoya earned 500 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

705 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now