Posts by Shoo

    Re: Referencing worksheet into VBA


    Aha, thanks, the code is complete - but how do I put it into operation so that it determines UnitHirePrice?


    Re: Referencing worksheet into VBA


    What would the opening "sub" for the below be?


    Re: Referencing worksheet into VBA


    Great thanks. I will post the full code once i finished it, then tell me if it's possible as an excel formula :yikes:


    Ah one more question! What do I put into the private sub line?

    Re: Referencing worksheet into VBA


    Sure, thanks.


    Raw Data:
    ItalyBoat
    GreeceBoat
    FranceBoat
    SpainBoat


    June
    July
    August


    ItalyJunPrice
    ItalyJulPrice
    ItalyAugPrice
    etcetera
    etcetera


    OK: If ItalyBoat is selected and August is selected then the data output should be ItalyAugPrice.

    Hi I want to add a complex formula to my worksheet the only way to do this is by using VBA.


    My question is, how do I reference my worksheet cells and ranges into VBA and how do I grammar excel VBA?


    example of a function I want to emply:


    The code is to determine data within "cellX"


    Code
    dim CellX as double
    
    
    If Cell1 = Cell2 & Cell3 = Cell4
    
    
    then Cellx = Cell5 
    
    
    ElseIf .....

    =IF(SelectCountry=France,FranceBoats)
    =IF(SelectCountry=Greece,GreeceBoats)


    The desired effect is when selectCountry is France the options available in the list box are franceBoats but if selectCountry is Greece then the options available are Greeceboats. The equations above work as stand alones but how do I put them together in one equation?


    It will be frustrating and disappointing if there is a such a short sighted limitation like this that does not allow the combination of such equations for one list box source.


    Thanks.