Solved

Populating comment in Excel with results from VBlookup

Posted on 2014-09-24
4
85 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: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 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

785 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