PDA

View Full Version : VLookup, Hlookup function



pico
11-07-2006, 07:18 AM
Hi guys,
I have a question regarding vlookup or hlookup or whatever function excel could use to solve my problem. I have a userform in sheet1 where control toolbar checkbox(ex:softstart checkbox) is updated. I also have two cells in sheet 1 namely for voltage and Horsepower rating. something like this--->
Softstart (checkbox)
Motor-(HP cell, Voltage cell)

If the softstart checkbox is selected and the motor horsepower and voltage ratings are selected output partnumber for the items. The table required is stored in sheet 2 and it looks like this.

Voltage HP
15 20 25 30 35 40
208 P# P# P# P# P# P#

230 P# P# P# P# P# P#

460 P# P# P# P# P# P#

I cant type the table correctly on the forum ...hopefully people get the idea. The voltage column contains 208 , 230 and 460 on the left...the Hp colum is horizontal 15,20,25,30...based on the voltage and horsepower select the partnumber.

I would like the code to ouput the specific partnumbers for the softstarter according to the voltage and hp supplied on sheet 1. Is this possible using excel?...Any help would be greatly appreciated. Thanks. Btw this site rocks!

Bob Phillips
11-07-2006, 08:51 AM
Here is an example

pico
11-07-2006, 09:00 AM
thanks a bunch xld for the reply. There is a slight discrepancy though. I need to check my check box as well to see if softstart was selected. If selected then get the information from the cells from sheet 1 for voltage and horsepower and compare with the table. Btw, how can i upload/attach my excel file over here?

Bob Phillips
11-07-2006, 09:06 AM
thanks a bunch xld for the reply. There is a slight discrepancy though. I need to check my check box as well to see if softstart was selected. If selected then get the information from the cells from sheet 1 for voltage and horsepower and compare with the table. Btw, how can i upload/attach my excel file over here?

when replying, there is a 'Manage Attachments' button.

pico
11-07-2006, 09:19 AM
Ok I have attached part of the file. I dont think it copied the macro over. But this should give you an idea.Thanks. If you need more info lemme know. Ciao

pico
11-07-2006, 09:23 AM
To give you an idea of what's going on. I have a macro of the user form in vba for various selections of motor voltages, horsepower and so on when the excel file is opened. After the user enters the information it prints the data entered into the "Job Spec Form". I have created the sheet so that i could use it for printing purposes as well. After the information is linked from the macro to the excel sheet, I work with the excel sheet from there. The project is still on going. If you have more questions lemme know. Ciao

pico
11-07-2006, 09:28 AM
I have also included the Output Sheet . You might wanna take a look at it. Cheers

Bob Phillips
11-07-2006, 09:35 AM
I am sorry, there are far too many variables, far too many options for me to have to work throught and figure out what is wanted.

If you tell us what you want to read, what you want to check it against, all options, and give some examples, I am sure it will be easy. But I am not going tp work it from first principles.

pico
11-07-2006, 09:45 AM
Oopsie,

Sorry I didnt want you to take the whole project by yourself. From the Job spec form when the motor Horsepower and Voltage ratings are displayed and the softstart checkbox is selected the output partnumber would be selected from the table. That's all i need to know.

Also how would i show the preview screen from a macro. Iam talking about the excel preview screen. If the user selects print on the macro it would invoke the print preview screen(jobspecform) in macro. I do not want the user to edit any data from that form. Just a readonly for printing purposes. Thanks. for the help so far.

pico
11-07-2006, 02:32 PM
Thank you. I have the output that i need. But i'd like to search the partnumber using the index function only if a control toolbox checkbox is selected. How would i go about doing this?