#1   Report Post  
Posted to microsoft.public.excel.misc
rr rr is offline
external usenet poster
 
Posts: 20
Default VLookup

I have used the VLookup to pull the data. The data shows up with my commend
and highlight. Somehow, it stops. VLookup only pulls the data. Help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 222
Default VLookup

I don't know if this is what you're looking for but try
http://www.psych.auckland.ac.nz/psyc...s/AppForms.htm

"rr" wrote:

I have used the VLookup to pull the data. The data shows up with my commend
and highlight. Somehow, it stops. VLookup only pulls the data. Help.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 222
Default VLookup

Sorry, got posted to the wrong place. Your question needs a bit more
information. How is your data stored? What is the formula you are using?

"bigwheel" wrote:

I don't know if this is what you're looking for but try
http://www.psych.auckland.ac.nz/psyc...s/AppForms.htm

"rr" wrote:

I have used the VLookup to pull the data. The data shows up with my commend
and highlight. Somehow, it stops. VLookup only pulls the data. Help.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default VLookup

Formulas retrieve values--not comments and not formats.

rr wrote:

I have used the VLookup to pull the data. The data shows up with my commend
and highlight. Somehow, it stops. VLookup only pulls the data. Help.


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default VLookup

Actually, you could use a UDF to retrieve the value and comment:

Option Explicit
Function VlookupComment(myVal As Variant, myTable As Range, _
myColumn As Long, myBoolean As Boolean) As Variant

Application.Volatile True

Dim res As Variant 'could be an error
Dim myLookupCell As Range

With Application.Caller
If .Comment Is Nothing Then
'do nothing
Else
.Comment.Delete
End If
end with

res = Application.Match(myVal, myTable.Columns(1), myBoolean)
If IsError(res) Then
VlookupComment = "Not Found"
Else
Set myLookupCell = myTable.Columns(myColumn).Cells(1)(res)
VlookupComment = myLookupCell.Value
With Application.Caller
If myLookupCell.Comment Is Nothing Then
'no comment, do nothing
Else
.AddComment Text:=myLookupCell.Comment.Text
End If
End With
End If

End Function

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Short course:

Open your workbook.
Hit alt-f11 to get to the VBE (where macros/UDF's live)
hit ctrl-R to view the project explorer
Find your workbook.
should look like: VBAProject (yourfilename.xls)

right click on the project name
Insert, then Module
You should see the code window pop up on the right hand side

Paste the code in there.

Now go back to excel.
Into a test cell and type:
=VlookupComment(a1, 'sheet 33'!a:e, 5, false)

rr wrote:

I have used the VLookup to pull the data. The data shows up with my commend
and highlight. Somehow, it stops. VLookup only pulls the data. Help.


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
rr rr is offline
external usenet poster
 
Posts: 20
Default VLookup

Thank you very much. It has been a while for me to go into those old
familiar codings. I will try them. :)

rr

"Dave Peterson" wrote:

Actually, you could use a UDF to retrieve the value and comment:

Option Explicit
Function VlookupComment(myVal As Variant, myTable As Range, _
myColumn As Long, myBoolean As Boolean) As Variant

Application.Volatile True

Dim res As Variant 'could be an error
Dim myLookupCell As Range

With Application.Caller
If .Comment Is Nothing Then
'do nothing
Else
.Comment.Delete
End If
end with

res = Application.Match(myVal, myTable.Columns(1), myBoolean)
If IsError(res) Then
VlookupComment = "Not Found"
Else
Set myLookupCell = myTable.Columns(myColumn).Cells(1)(res)
VlookupComment = myLookupCell.Value
With Application.Caller
If myLookupCell.Comment Is Nothing Then
'no comment, do nothing
Else
.AddComment Text:=myLookupCell.Comment.Text
End If
End With
End If

End Function

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Short course:

Open your workbook.
Hit alt-f11 to get to the VBE (where macros/UDF's live)
hit ctrl-R to view the project explorer
Find your workbook.
should look like: VBAProject (yourfilename.xls)

right click on the project name
Insert, then Module
You should see the code window pop up on the right hand side

Paste the code in there.

Now go back to excel.
Into a test cell and type:
=VlookupComment(a1, 'sheet 33'!a:e, 5, false)

rr wrote:

I have used the VLookup to pull the data. The data shows up with my commend
and highlight. Somehow, it stops. VLookup only pulls the data. Help.


--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.misc
rr rr is offline
external usenet poster
 
Posts: 20
Default VLookup

I pull the data from system in one page & gather logged verify data in second
page. I reconcile a summary & commented in the second page. The formula,
IF(ISERROR(VLOOKUP($C225,Log!$A$1:$D$200,3,0)),"", VLOOKUP($C225,Log!$A$1:$D$200,3,0)),
is used to pull the second page data to match with the first page system data
for record completeness. Therefore, the comment becomes very important.


"bigwheel" wrote:

Sorry, got posted to the wrong place. Your question needs a bit more
information. How is your data stored? What is the formula you are using?

"bigwheel" wrote:

I don't know if this is what you're looking for but try
http://www.psych.auckland.ac.nz/psyc...s/AppForms.htm

"rr" wrote:

I have used the VLookup to pull the data. The data shows up with my commend
and highlight. Somehow, it stops. VLookup only pulls the data. Help.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLookup a Vlookup adamb2000 Excel Worksheet Functions 4 June 28th 06 10:54 PM
VLOOKUP Problem Ian Excel Discussion (Misc queries) 3 April 6th 06 06:47 PM
VLOOKUP Limitations chris_manning Excel Worksheet Functions 2 August 9th 05 06:23 PM
Have Vlookup return a Value of 0 instead of #N/A Mr Mike Excel Worksheet Functions 4 May 25th 05 04:51 PM
vlookup data hidden within worksheet Excel Worksheet Functions 0 January 26th 05 12:09 PM


All times are GMT +1. The time now is 07:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"