Hey there! Have a table with headers of specific locations and a column of dates going back several years. I need a person to be able to search by location and value and return the corresponding date(s) in a pop up box (msgbox). I could probably write a formula but I'm guessing there is a possible better way to do it in VBA using a command button. Would also need some error handling if a value is not found for a specific location. Any help would be much appreciated
For example - The user would enter "Location 1" in one cell (A1) and "55" in another cell (B1). A box would pop up with 1/2/2010 and 1/3/2010. Assume the table is on the same worksheet as the reference cells and command button
[TABLE="width: 500, align: center"]
<TBODY>[TR]
[TD]Date
[/TD]
[TD]Location 1
[/TD]
[TD]Location2
[/TD]
[TD]Location 3
[/TD]
[/TR]
[TR]
[TD]1/1/2010
[/TD]
[TD]50
[/TD]
[TD]44
[/TD]
[TD]42
[/TD]
[/TR]
[TR]
[TD]1/2/2010
[/TD]
[TD]55
[/TD]
[TD]52
[/TD]
[TD]47
[/TD]
[/TR]
[TR]
[TD]1/3/2010
[/TD]
[TD]55
[/TD]
[TD]51
[/TD]
[TD]47
[/TD]
[/TR]
[TR]
[TD]1/4/2010
[/TD]
[TD]51
[/TD]
[TD]47
[/TD]
[TD]44
[/TD]
[/TR]
</TBODY>[/TABLE]
For example - The user would enter "Location 1" in one cell (A1) and "55" in another cell (B1). A box would pop up with 1/2/2010 and 1/3/2010. Assume the table is on the same worksheet as the reference cells and command button
[TABLE="width: 500, align: center"]
<TBODY>[TR]
[TD]Date
[/TD]
[TD]Location 1
[/TD]
[TD]Location2
[/TD]
[TD]Location 3
[/TD]
[/TR]
[TR]
[TD]1/1/2010
[/TD]
[TD]50
[/TD]
[TD]44
[/TD]
[TD]42
[/TD]
[/TR]
[TR]
[TD]1/2/2010
[/TD]
[TD]55
[/TD]
[TD]52
[/TD]
[TD]47
[/TD]
[/TR]
[TR]
[TD]1/3/2010
[/TD]
[TD]55
[/TD]
[TD]51
[/TD]
[TD]47
[/TD]
[/TR]
[TR]
[TD]1/4/2010
[/TD]
[TD]51
[/TD]
[TD]47
[/TD]
[TD]44
[/TD]
[/TR]
</TBODY>[/TABLE]