Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting data based on user input 1

Status
Not open for further replies.

learninone

Computer
Oct 12, 2005
4
Hello, I have a spreadsheet with about 30 rows and 30 columns. Column 1 has values say from 1 to 30 and row 1 has similiar values. I would like to create a macro or vb program where the user could put in two values say 1 and 5 and then the value in column 1 row 5 would be displayed. This is probably simple to you folks but I have never wrote a macro and haven't done any vb programming in years.
 
Replies continue below

Recommended for you

When you say
where the user could put in two values
Where would they put them? A specific cell? A text box? A different sheet? A VB App?
 
Well that would be part of my problem. But I would use whatever method is eaisest for user input.
 
So, have the user put the values in separate cells. Excel help has explanations on how to do indirect addressing.

TTFN



 
Basically put =INDIRECT($A31) in cell B31 and then enter the value C5 in cell A31. Excel will put the value that is in cell C5 in cell B31. Does that make sense?
 
I am not explaining this correctly. In the spreadsheet I have 4/5 in column 1 row 5 cell. I have 4 in column 5 row 5. I want to input 4/5 and 4 and get/display the data in cell 5,5.
Thanks for your patience. I am just trying to learn this stuff.
 
So if you input 4/5 and 4, is that suppose to search the columns for the value 4/5 and then get the value in the 4 column? I guess I am not following your algorithm.
 
I currently have printed out a spreadsheet with data. The inner cells have data relating to the data in column 1 and row 1. If value 1 = 4/5 and value 2 = 4, I go down column 1 until I see 4/5 (this data is at row 6) I then go over row 1 and find 4 this data is at column P. So the inner data is in cell p6. This is the data I am trying to pull up with out scanning the spreadsheet. In other words I would like to enter 4/5 and 4 and have the data in cell p6 displayed. Just trying to speed up a manual activity.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor