+ Reply to Thread
Results 1 to 6 of 6

various conditions that have to be met in an if statement

  1. #1
    Registered User
    Join Date
    09-07-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    20

    various conditions that have to be met in an if statement

    Hi,
    I have a spreadsheet, where there are
    -hectares
    -Price per ha
    -Crop
    -Row spacing (3Feet, 5Feet and 7Feet)

    I have been able to calculte the following:
    If the hectares is 0,0, If the crop is "Maize", then multiply 'Price per hectare' by 'hectare'

    Now I would like to add 'Row Spacing', but
    If Row Spacing is 3Feet, then multiply Price per hectare by 1 and by hectare
    if Row Spacing is 5Feet, then multiply Price per hectare by .35 and by hectare
    if Row Spacing is 7Feet, then multiply Price per hectare by .22 and by hectare

    I would be grateful for your help.
    Thank you,
    Manjula

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: various conditions that have to be met in an if statement

    Suggest you upload a sample workbook with some typical data ... and the answers you expect to see.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    09-07-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: various conditions that have to be met in an if statement

    thank you.
    attached, please find the worksheet.
    Attached Files Attached Files

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: various conditions that have to be met in an if statement

    =CHOOSE(MATCH($G7,{"","3 Feet","5 Feet","7 Feet"},0),0,1,0.35,0.22)

    =IF($F7=0,0,IF($E7="Maize",I$4*$F7,0))*CHOOSE(MATCH($G7,{"","3 Feet","5 Feet","7 Feet"},0),0,1,0.35,0.22)


    or you could set up a small data table somewhere and use VLOOKUP


    Regards, TMS

  5. #5
    Registered User
    Join Date
    09-07-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: various conditions that have to be met in an if statement

    Thank you TMS, it worked like a charm.
    wonderful!

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: various conditions that have to be met in an if statement

    You're welcome. Thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1