Results 1 to 7 of 7

VBA- Nested If Statements

Threaded View

Magnum83C VBA- Nested If Statements 02-04-2020, 05:40 PM
gue2013 Re: VBA- Nested If Statements 02-06-2020, 04:40 PM
Magnum83C Re: VBA- Nested If Statements 02-07-2020, 12:32 PM
Magnum83C Re: VBA- Nested If Statements 02-10-2020, 11:54 AM
gue2013 Re: VBA- Nested If Statements 02-10-2020, 02:57 PM
Magnum83C Re: VBA- Nested If Statements 02-11-2020, 01:19 PM
gue2013 Re: VBA- Nested If Statements 02-11-2020, 01:57 PM
  1. #1
    Registered User
    Join Date
    02-04-2020
    Location
    Waterloo
    MS-Off Ver
    2013
    Posts
    4

    VBA- Nested If Statements

    Hello,

    I am new to VBA and having trouble creating a Nested IF statement with multiple criteria. The formatting of VBA is quite unfamiliar to me, If somebody could start the first lines of code in which I could mimic for a loop it would be much appreciated. Thank you so much.

    I would like the code to do something like this; (Please refer to the excel doc)
    "Criteria": is what i want incorporated in the IF statements logical test
    "Data Set": Is the raw data I see on my end

    I would like the output to be in column G. This is how it would be coded in excel without VBA for 2 sets of criteria. The problem is I have a lot of sets of criteria. This is also shown in the excel doc.

    =IF(AND(H3="Non Structured",OR(I3="PUB",I3="MNY",I3="PBC",I3="PFB",I3="PFG",I3="PBB",I3="PBL",I3="PHM",I3="PHU",I3="RPO"),AND(K3="Bonds")),"Nope",IF(AND(H3="Structured",OR(I3="PUB",I3="p01",I3="PBC",I3="PHU"),AND(K3="Bonds")),"Yes", IF(AND(.......

    Note: "Value if false" is another IF statement testing for a new set of criteria.

    Essentially I would loop this formula for the entire column of G, but adjusting it to add other Investment Categories too (Structured, Non Structured). So for every cell in Column G it would look at the data in columns H-K and spit out an output accordingly.

    Hopefully this is clear, thank you!
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Formula with nested IF statements & AND statements
    By Hollywood44 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-11-2018, 03:38 PM
  2. [SOLVED] Nested if statements containing multiple and statements
    By John M. in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-22-2014, 11:48 PM
  3. questions with if statements and nested if statements
    By Pat Excel in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 02-03-2013, 01:41 PM
  4. Nested if statements with AND and OR statements
    By joeljoel in forum Excel General
    Replies: 4
    Last Post: 08-08-2011, 12:57 PM
  5. Multiple nested IF statements and AND statements
    By TonyGetz in forum Excel General
    Replies: 2
    Last Post: 12-14-2010, 03:07 AM
  6. Nested If statements / logic statements
    By Brainless_09 in forum Excel General
    Replies: 3
    Last Post: 06-17-2009, 02:59 PM
  7. Replies: 12
    Last Post: 05-15-2009, 08:38 AM

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