+ Reply to Thread
Results 1 to 7 of 7

Automatically populating data from Sheet 1 to Sheet 2 ONLY if certain criteria are met

  1. #1
    Registered User
    Join Date
    05-07-2015
    Location
    Logan, Utah
    MS-Off Ver
    2009
    Posts
    5

    Red face Automatically populating data from Sheet 1 to Sheet 2 ONLY if certain criteria are met

    Hi,

    I've been combing through the forums and everywhere else online and can't quite seem to find the answers I'm looking for. I'm hoping someone can help! I have a spreadsheet of tables listed in order by the credit card user's name and the last 4 digits of their card number. Each table consists of a 6 month period of time (six rows) which calculates the overall average spending. The blue column shows the average spent each month (calculated against their monthly allowed spending limit), over six months. The orange column show the averages of the amounts of the highest single purchase made within that same month (again, based on a max. single purchased limit). I have attached an example to make it more confusing :-P

    What I need is a second sheet to populate (and update) automatically with the following information ONLY if/when the following criteria is met:
    1. The Full_Name and Last_4 of the user whose Monthly Purch% AND/OR Single Purch% is less than or equal to 25% OR is greater than or equal to 100% (using only the cells just to the right of "Total average over 6 month). Of course, if any of those criteria are met, I need BOTH the Monthly Purch% and Single Purch% to be listed after the person's Full_Name and Last_4.

    In my attachment, Sheet 1 shows the data. Sheet 2 (in the same file) is set up to show what I want to populate (and how) IF the above criteria are met. Basically, we are assessing credit card risk and want to look at those are consistently spending below 25% of their open credit, or conversely, who are spending at 100% or above (made possible by making a phone call to our purchasing department for "one-time" purchase limit increase waivers, etc.)

    Thank you!!
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Automatically populating data from Sheet 1 to Sheet 2 ONLY if certain criteria are met

    here is 1 way...

    1. use a helper column in sheet 1 - I used L.
    2. put thios in L2 and copy down...
    =IF(A2="","",IF(OR(G2<=0.25,G2>=1,J2<=0.25,J2>=1),MAX($L$1:L1)+1,MAX($L$1:L1)))
    3. put this in sheet2 A3, and copy down and across...
    =IFERROR(INDEX(Sheet1!$A$2:$K$23,MATCH(ROW(A1),Sheet1!$L$2:$L$23,0),MATCH(A$2,Sheet1!$A$1:$K$1,0)),"")

    You can hide the helper if needed
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    05-07-2015
    Location
    Logan, Utah
    MS-Off Ver
    2009
    Posts
    5

    Re: Automatically populating data from Sheet 1 to Sheet 2 ONLY if certain criteria are met

    Thanks for the response Ford!

    I plugged in what you suggested. However, it's giving me more than I need? It seems to be giving me a result for each month. Each table is 6 months of data for a single card user and their corresponding card # (some users have up to 20 different cards!) The result I got was anywhere from 4-6 lines for the each table where I need just one line returned for each entire six months (e.g. each table) worth of data, based on, for example, G8 and J8 (for Heidi Adams for Card# 1111). So, I'm hoping the results will look like:
    Result example.PNG

    So, the desired result will only place the information into Sheet 2 if using, for example, G8 and/or J8 if they have values lesser than or equal to 25% or greater than or equal to 100%. Also, I'm hoping for no blank rows in the results page (Sheet 2).

    Thanks! :-)
    Attached Images Attached Images
    Last edited by Spifferific; 05-07-2015 at 08:06 PM.

  4. #4
    Registered User
    Join Date
    05-07-2015
    Location
    Logan, Utah
    MS-Off Ver
    2009
    Posts
    5

    Re: Automatically populating data from Sheet 1 to Sheet 2 ONLY if certain criteria are met

    Oops. Sorry! Please ignore the "attached" image that doesn't have the percentages filled in for Paul or Patsy.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Automatically populating data from Sheet 1 to Sheet 2 ONLY if certain criteria are met

    aahh OK I misunderstood (I think) You only want the naqme shown if the TOTAL meets the criteria?

    If so, change the helper column to this...
    =IF(AND(b2="",G2<>""),IF(OR(G2<=0.25,G2>=1,J2<=0.25,J2>=1),MAX($L$1:L1)+1,MAX($L$1:L1)),"")
    Make sure you have the name in the last row of the "set"

    Also, change the formula on sheet2 to this...
    =IFERROR(INDEX(Sheet1!$A$2:$K$100,MATCH(ROW(A1),Sheet1!$L$2:$L$100,0),MATCH(A$2,Sheet1!$A$1:$K$1,0)),"")
    copied down and across (I just increased the range for you

  6. #6
    Registered User
    Join Date
    05-07-2015
    Location
    Logan, Utah
    MS-Off Ver
    2009
    Posts
    5

    Re: Automatically populating data from Sheet 1 to Sheet 2 ONLY if certain criteria are met

    Thanks! I've already gone home from work for the day so I'll give a try tomorrow! :-)

  7. #7
    Registered User
    Join Date
    05-07-2015
    Location
    Logan, Utah
    MS-Off Ver
    2009
    Posts
    5

    Re: Automatically populating data from Sheet 1 to Sheet 2 ONLY if certain criteria are met

    Ford,

    This is working better for what I need, but still no cigar. I hate to feel like I'm pestering, but what I'm hoping is that Sheet 2 will only populate IF the criteria are met. Right now, it's just plopping in a zero. In the end, this sheet could have approx. 2000 names, and I would hate for that much information to be interspersed with zeros or blank lines. I'm also wondering if there's a way to make the formula pull the user's name from, say, A2 and the last 4 of their card from B2, rather than having to go into my document and ad their names and card # to another line. I literally have 23000 lines of data to troll through in my original document and it would take me quite a while just to copy and paste that info to a seventh line.

    Thanks again.

+ 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. Replies: 19
    Last Post: 02-27-2014, 02:42 AM
  2. Automatically copying data to another sheet if criteria is met
    By steve1225 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-07-2013, 12:34 PM
  3. Replies: 5
    Last Post: 06-21-2012, 05:16 PM
  4. Replies: 6
    Last Post: 04-14-2012, 02:37 PM
  5. Replies: 0
    Last Post: 06-22-2010, 02:53 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