Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old August 17th 07, 10:53 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Nov 2006
Posts: 68
Default Help Needed With Message Box

I don't know if this is possible and if it is how I go about it but here
goes....

I have some data on a worksheet called Data

I have some summary info on another sheet called Summary

I want to have a message box appear when a user selects any cell in col D of
Summary where the message is the result of a lookup of the same row in Col C
against the range F1:G5000 in Data.

Hopefully this is clear but rather than pure text in the Message Box I want
the message to always be the formulaic result of
Vlookup(RC[-1],Data!F1:G5000,2,False)

How do I code that in the MsgBox () and how do I make the box appear for any
cell in Col D

Thanks a lot

  #2   Report Post  
Old August 18th 07, 02:38 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 3,986
Default Help Needed With Message Box

I am not so sure that this is what you want. It will
only return the first occurence of the match to column
C of the source document to Column F of the search
document with value or Col G. But it does do that.

Private Sub Worksheet_Change(ByVal Target As Range)
Set x = Application.Intersect(Target, Columns("D"))
If Not x Is Nothing Then
luRng = Worksheets("Data").Range("F1:G5000")
y = Application.WorksheetFunction.VLookup(Target.Offse t(0, -1).Value,
luRng, 2, False)
End If
MsgBox y
End Sub

"nospaminlich" wrote:

I don't know if this is possible and if it is how I go about it but here
goes....

I have some data on a worksheet called Data

I have some summary info on another sheet called Summary

I want to have a message box appear when a user selects any cell in col D of
Summary where the message is the result of a lookup of the same row in Col C
against the range F1:G5000 in Data.

Hopefully this is clear but rather than pure text in the Message Box I want
the message to always be the formulaic result of
Vlookup(RC[-1],Data!F1:G5000,2,False)

How do I code that in the MsgBox () and how do I make the box appear for any
cell in Col D

Thanks a lot

  #3   Report Post  
Old August 18th 07, 02:40 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 3,986
Default Help Needed With Message Box

I assume you know that goes in the sheet code module.

"nospaminlich" wrote:

I don't know if this is possible and if it is how I go about it but here
goes....

I have some data on a worksheet called Data

I have some summary info on another sheet called Summary

I want to have a message box appear when a user selects any cell in col D of
Summary where the message is the result of a lookup of the same row in Col C
against the range F1:G5000 in Data.

Hopefully this is clear but rather than pure text in the Message Box I want
the message to always be the formulaic result of
Vlookup(RC[-1],Data!F1:G5000,2,False)

How do I code that in the MsgBox () and how do I make the box appear for any
cell in Col D

Thanks a lot

  #4   Report Post  
Old August 18th 07, 03:06 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Sep 2007
Posts: 417
Default Help Needed With Message Box

It might be simpler to add another column to your Summary sheet, and
place the formula there that looks up the value on the Data worksheet.
Having message boxes pop up all of the time can get annoying after a
while. If the added column of data is not to be printed out, then hide
the column before printing.
--
Regards,
Bill Renaud





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
Error message needed if incorrect Date Of Birth (DOB) entered Craig Excel Worksheet Functions 5 January 27th 10 08:24 PM
#VALUE! error message help needed please Bob Newman Excel Worksheet Functions 3 November 25th 07 04:56 PM
VBA-Error Message Assistance Needed MLS7181 Excel Programming 7 May 3rd 06 08:52 PM
Intercept/replace standard 'cell protected' message with my own message? KR Excel Programming 3 March 16th 06 02:31 PM
.dll error message help needed Wylie C Excel Programming 0 November 1st 05 04:46 PM


All times are GMT +1. The time now is 07:28 PM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017