+ Reply to Thread
Results 1 to 10 of 10

Select Value After Two Conditions Are Met (Sheet Attached)

  1. #1
    Registered User
    Join Date
    05-30-2016
    Location
    Tokyo
    MS-Off Ver
    MS Office 2010
    Posts
    5

    Select Value After Two Conditions Are Met (Sheet Attached)

    Hi all!

    I've been thinking about a solution for this problem since this morning. I hope I can get help from this fine forum's members.

    Problem:

    "Master" sheet is like a summary of key data from different facilities provided to different corporate clients. Limit is the total of "On BS" and "Off BS" (standing for On Balance Sheet and Off Balance Sheet, respectively). I was able to get "Limit" by using a simple Vlookup. However, I am not able get the following two results for "On BS" and "Off BS."
    "On BS" is supposed to return the client's On Balance Sheet totals (code LG040). Similarly, "Off BS" is supposed to return the same client's Off Balance Sheet totals (Code LG060).


    Example:

    Client 1001 has a number of facility types, each with its own code. "Limit" should return its total approved limit, which can be found in both sheet "LL" and "LLIC."
    Then, "On BS" should go through the list of facility codes and return the value under the column "Outstanding" that matches the row with code LG040 for the client 1001. Similar should be for "Off BS," except that it should return the value for code LG060.

    I thank you in advance for your effort and support.
    Attached Files Attached Files

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Select Value After Two Conditions Are Met (Sheet Attached)



    This will get the first OnBS

    =VLOOKUP("LG040",IF($A2=LLIC!$A$2:$A$46,LLIC!$C$2:$F$46), 3, FALSE)

    After that the first argument in VLOOKUP is a reference. Which do you want to use ... the hard LG040 and LG060 or the references in column A?

    Also confused @ which column is OffBS in LLIC.
    Dave

  3. #3
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Select Value After Two Conditions Are Met (Sheet Attached)

    Hi and Welcome

    Not sure I fully understand but I think you want this in D2

    Please Login or Register  to view this content.
    and this in E2

    Please Login or Register  to view this content.
    AND you'll need to convert the numbers in Column A of Sheet LLIC from Text to numbers. Highlight them all and click on the little symbol that comes up and select text to numbers
    Happy with my advice? Click on the * reputation button below

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Select Value After Two Conditions Are Met (Sheet Attached)

    Crooza covered the numbers text part.

    I think I have found the answer to my own questions.

    Array enter this in D2 and fill down.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter. (CSE)


    Then array enter this in E2 and fill down.


    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-30-2016
    Location
    Tokyo
    MS-Off Ver
    MS Office 2010
    Posts
    5
    Quote Originally Posted by FlameRetired View Post


    This will get the first OnBS

    =VLOOKUP("LG040",IF($A2=LLIC!$A$2:$A$46,LLIC!$C$2:$F$46), 3, FALSE)

    After that the first argument in VLOOKUP is a reference. Which do you want to use ... the hard LG040 and LG060 or the references in column A?

    Also confused @ which column is OffBS in LLIC.
    Thanks, Dave. The formula works great, but only for the first row. When I copy paste the formula in the cells below, I get an error (#N/A).

    Sorry for the confusion, LG060 stands for 'Total Non-Funded,' which means Off BS. The values for On BS and Off BS are in the Dame column, E of LLIC. Thanks again.

  6. #6
    Registered User
    Join Date
    05-30-2016
    Location
    Tokyo
    MS-Off Ver
    MS Office 2010
    Posts
    5
    Quote Originally Posted by Crooza View Post
    Hi and Welcome

    Not sure I fully understand but I think you want this in D2

    Please Login or Register  to view this content.
    and this in E2

    Please Login or Register  to view this content.
    AND you'll need to convert the numbers in Column A of Sheet LLIC from Text to numbers. Highlight them all and click on the little symbol that comes up and select text to numbers
    Thank you, Crooza. The formula worked great, but again, only for the first row. When copy pasting the formula in the cells below, I am getting zeros.
    I also tried after converting numbers in column A of sheet LLIC to numbers, but still the same result.
    Thanks again.

  7. #7
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Select Value After Two Conditions Are Met (Sheet Attached)

    here's the file with the formulas in
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    05-30-2016
    Location
    Tokyo
    MS-Off Ver
    MS Office 2010
    Posts
    5
    Quote Originally Posted by FlameRetired View Post
    Crooza covered the numbers text part.

    I think I have found the answer to my own questions.

    Array enter this in D2 and fill down.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter. (CSE)


    Then array enter this in E2 and fill down.


    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thank you again, Dave. After copying your formula, again, the first row is perfect. However, I'm getting zeros in the cells below.
    I will look up CSE, it could be that I'm not doing this part properly.
    Thanks!

  9. #9
    Registered User
    Join Date
    05-30-2016
    Location
    Tokyo
    MS-Off Ver
    MS Office 2010
    Posts
    5

    Re: Select Value After Two Conditions Are Met (Sheet Attached)

    Quote Originally Posted by Crooza View Post
    here's the file with the formulas in
    Perfect! Thank you very much, Crooza! I was about to look into VBA coding. I have some experience in C++, and was thinking a 'While Loop' may come in handy, but you saved me

    Once again, thanks!

  10. #10
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Select Value After Two Conditions Are Met (Sheet Attached)

    Great. Glad it worked

+ 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. Need a Macro that enters a score if the correct conditions are met (File Attached)
    By unit285 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-05-2015, 11:53 AM
  2. [SOLVED] Macro to select the correct border and fill the cells white. VBA Attached
    By anthony.maddick in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-13-2014, 07:41 PM
  3. Need to select data based on conditions in a separate sheet then return the values
    By scottmcclean in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-14-2014, 03:39 PM
  4. Replies: 8
    Last Post: 01-23-2014, 05:28 AM
  5. Replies: 6
    Last Post: 07-18-2013, 02:34 AM
  6. select certain columns to be attached in email attachment
    By rlsublime in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-06-2011, 03:00 PM
  7. macro to select a cell after performing a search (Attached)
    By Mayweed in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-01-2010, 08:39 AM

Tags for this Thread

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