+ Reply to Thread
Results 1 to 5 of 5

Compounded condition in If statement

  1. #1
    Forum Contributor
    Join Date
    02-05-2015
    Location
    czech
    MS-Off Ver
    2010
    Posts
    172

    Compounded condition in If statement

    I would like to use compound condition as follows:

    If Range(a) = smth1 And Range(b) = smth2 And Range(c) <> smth3 Then
    ....
    Else
    ....
    End If

    Is it somehow possible without nesting If statements?

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Compounded condition in If statement

    Maybe

    =IF(AND(A2="smth1",B2="smth2",C2<>"smth3"),D2,"")

    in VBA

    Please Login or Register  to view this content.
    Change the Val Values as required and the ranges too
    Last edited by NeedForExcel; 08-17-2015 at 08:21 AM.
    Cheers!
    Deep Dave

  3. #3
    Forum Contributor
    Join Date
    02-05-2015
    Location
    czech
    MS-Off Ver
    2010
    Posts
    172

    Re: Compounded condition in If statement

    Yes in VBA macro otherwise I would post it elswhere.

  4. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Compounded condition in If statement

    See post#2

  5. #5
    Forum Contributor
    Join Date
    02-05-2015
    Location
    czech
    MS-Off Ver
    2010
    Posts
    172

    Re: Compounded condition in If statement

    Thanks, now I know that it works as I thought. Strangely in my macro it evaluated only first two condtions. Is it somehow possible to compound condition like this?:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Compounded Interest quarterly
    By zaska in forum Excel General
    Replies: 2
    Last Post: 05-29-2014, 10:37 AM
  2. Compounded rate of return?
    By existent80 in forum Excel General
    Replies: 8
    Last Post: 01-07-2011, 01:35 PM
  3. Excel Template for calculating compounded yield
    By jacksonmathews in forum Excel General
    Replies: 5
    Last Post: 07-14-2008, 09:25 AM
  4. Using loop to output compounded values
    By derekbrown in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-13-2007, 06:06 PM
  5. Calculating Compounded Growth Rates
    By Beauwebber in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-12-2006, 07:10 PM
  6. [SOLVED] How to create compounded int table?
    By brett in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-18-2005, 02:30 AM
  7. [SOLVED] Compounded formula using SUM & AVERAGE
    By WIZPRO in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-06-2005, 02:06 PM

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