ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Nesting information (https://www.excelbanter.com/excel-programming/306064-nesting-information.html)

andyp161

Nesting information
 
Hello there,

I am currently in the process of setting up a stock contol spreadsheet
Each item of stock is issued with a particular code. Is there anywa
that I can programme Excel to store information on a particular code.
That is, if I were to type the code AFS341 in a cell, I would like th
stock description to be some how nested in the cell so that if a use
wanted to find out the stock description, they could do someting lik
double click on the code to reveal the nested description. I hope thi
makes sense to you.

Many thank

--
Message posted from http://www.ExcelForum.com


K Dales

Nesting information
 
Here is a simple routine that can be modified to do what
you want. You will need to set up a lookup table for the
VLOOKUP function somewhere in your workbook (I am using
the named range "LookupRange" in the example) - the lookup
range should be a sorted 2-column list with your codes in
the first column and the corresponding descriptions in the
2nd column.

Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As
Object, ByVal Target As Range, Cancel As Boolean)

Dim ShowMe As Variant

ShowMe = WorksheetFunction.VLookup(Target.Value, Sheets
("Sheet1").Range("LookupRange"), 2, False)

MsgBox Target.Value & ": " & ShowMe

End Sub

-----Original Message-----
Hello there,

I am currently in the process of setting up a stock

contol spreadsheet.
Each item of stock is issued with a particular code. Is

there anyway
that I can programme Excel to store information on a

particular code.
That is, if I were to type the code AFS341 in a cell, I

would like the
stock description to be some how nested in the cell so

that if a user
wanted to find out the stock description, they could do

someting like
double click on the code to reveal the nested

description. I hope this
makes sense to you.

Many thanks


---
Message posted from http://www.ExcelForum.com/

.


andyp161[_2_]

Nesting information
 
Thank you 'K Dales'

Unfortunately I do not have any experience in programming Excel -
assume what you have posted is syntax?? Please could you offer a brie
explanation of where and how I can carry out your proposal.

Many thank

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 10:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com