ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA Equivalent Match/Index functions (https://www.excelbanter.com/excel-programming/314898-vba-equivalent-match-index-functions.html)

Network Admin

VBA Equivalent Match/Index functions
 
Im trying to convert some spreadsheets to utilize VBA instead of
general Excel code due to complexity issues. We have numerous sheets
containing 1 and 2 dimmensional charts. Sheet one utilizes these
charts with regular validation lists created through
Data-Validation-Then choose a list to display.

How do I get the Item chosen on that list through VBA like I did with
the Match function (these charts are on multiple sheets):

example:
sheet1 contains validation utilizing the 1 dimmensional list named
"DoorType" (which this is defined on sheet3) and the user picks "1/4
BBH" and that is item 4 on the list. How would I use VBA to retrieve
number 4 has been chosen.

Also, with these Validations I have, I have 2 dimmensional charts that
are used based on what a user may choose with different options.

example:
sheet1 contains a couple validations that the user must choose his
option. Then when my previous question is calculated it will look up
on the 2 dimmensional chart "BBDDY" (defined on sheet2) (lets say item
3 was chosen on the first validation and item 6 was chosen on the next
validation)and I want to access item (3,6) on that chart. I tried
Range("Cell") = Range("BBDY").Cells(3,6).Value and get an error. I
belive this is like the Index function.

All the VBA code is going under Sheet1 and all defines and whatnot are
all defined in the same project file.

Thank you


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

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