Consulting

Results 1 to 10 of 10

Thread: VLookup, Hlookup function

  1. #1
    VBAX Contributor
    Joined
    Nov 2006
    Posts
    107
    Location

    VLookup, Hlookup function

    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!
    Last edited by pico; 11-07-2006 at 08:46 AM.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Here is an example

  3. #3
    VBAX Contributor
    Joined
    Nov 2006
    Posts
    107
    Location
    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?

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by pico
    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.

  5. #5
    VBAX Contributor
    Joined
    Nov 2006
    Posts
    107
    Location
    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

  6. #6
    VBAX Contributor
    Joined
    Nov 2006
    Posts
    107
    Location
    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

  7. #7
    VBAX Contributor
    Joined
    Nov 2006
    Posts
    107
    Location
    I have also included the Output Sheet . You might wanna take a look at it. Cheers

  8. #8
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    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.

  9. #9
    VBAX Contributor
    Joined
    Nov 2006
    Posts
    107
    Location
    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.

  10. #10
    VBAX Contributor
    Joined
    Nov 2006
    Posts
    107
    Location
    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •