+ Reply to Thread
Results 1 to 11 of 11

Using VLOOKUP to pull values into another sheet then count

  1. #1
    Registered User
    Join Date
    01-08-2021
    Location
    Rochester, NY
    MS-Off Ver
    Office 365
    Posts
    7

    Using VLOOKUP to pull values into another sheet then count

    Greetings experts, I have a particular situation I could really use your help with. I'm open to formulas or even VBA but I need help. I'm completely stumped. What I'm wanting to do is to take an exported CSV of all values from a pivot table. The columns are as follows:

    Vulnerabilty | AppName | High | Medium | Low

    The application name is appended either by inactive or decommissioned. What I'm hoping to do is take the vulnerabilities and applications under it that do not have those words contained in the appname cell. So for reference, here's a few rows of data in the format.

    example_before.png

    When I make my actual count, I want to have the Vulnerability count to be equal to the total that is not inactive or decommissioned, i.e. 6 instead of 59 which includes the two apps I don't want.

    So my new line in a separate sheet would look like this:

    example_after.png

    In the interest of saving space, the application column can be hidden or go away completely.

    So any thoughts how this can be done? Thank you!

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Using VLOOKUP to pull values into another sheet then count

    Hi and welcome.

    I have a feeling that VBA could do what you need here, but to be sure it would be helpful to see a dummy workbook (not a picture of one) that has a little more data in it that shows what the initial data looks like and what your desired result looks like.

    BSB

  3. #3
    Registered User
    Join Date
    01-08-2021
    Location
    Rochester, NY
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Using VLOOKUP to pull values into another sheet then count

    Ok, let me put something together that will give you a bit more data. I'll be back and thank you!

  4. #4
    Registered User
    Join Date
    01-08-2021
    Location
    Rochester, NY
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Using VLOOKUP to pull values into another sheet then count

    Ok, here is the sample workbook.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-08-2021
    Location
    Rochester, NY
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Using VLOOKUP to pull values into another sheet then count

    Just to clarify, I am looking to remove any that are Decommissioned, only counting the High/Med/Low of active and inactive applications by vulnerability.
    Last edited by dbrewerton; 01-28-2021 at 06:49 PM.

  6. #6
    Registered User
    Join Date
    01-08-2021
    Location
    Rochester, NY
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Using VLOOKUP to pull values into another sheet then count

    Quote Originally Posted by BadlySpelledBuoy View Post
    Hi and welcome.

    I have a feeling that VBA could do what you need here, but to be sure it would be helpful to see a dummy workbook (not a picture of one) that has a little more data in it that shows what the initial data looks like and what your desired result looks like.

    BSB
    Did you come up with anything for creating a VBA for this? Also, I only need to strip out decommissioned apps, so the inactive and active ones stay. Still would like to get this so once the decom are removed, have it re-total by vulnerability.
    Last edited by dbrewerton; 01-28-2021 at 06:47 PM. Reason: Additional information for Follow Up

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Using VLOOKUP to pull values into another sheet then count

    Here is a formula that does what you want (I think...). Next time, please EXPLICITLY show your expected results, to remove guesswork.

    To return the categories (copied down):
    =IFERROR(INDEX(Raw!A:A,AGGREGATE(15,6,ROW(Raw!$A$2:$A$1000)/(Raw!$A$2:$A$1000<>""),ROWS(A$2:A2))),"")

    To return the sum of valid results (copied across and down):
    =IF($A2="","",SUMPRODUCT((LOOKUP(ROW(Raw!$A$2:$A$100),ROW(Raw!$A$2:$A$100)/(Raw!$A$2:$A$100<>""),Raw!$A$2:$A$100)=$A2)*(Raw!$B$2:$B$100<>"")*(ISERROR(SEARCH("-",Raw!$B$2:$B$100))*Raw!C$2:C$100)))

    see the file.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  8. #8
    Registered User
    Join Date
    01-08-2021
    Location
    Rochester, NY
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Using VLOOKUP to pull values into another sheet then count

    Beautiful! Thank you so much!!!

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Using VLOOKUP to pull values into another sheet then count

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

  10. #10
    Registered User
    Join Date
    01-08-2021
    Location
    Rochester, NY
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Using VLOOKUP to pull values into another sheet then count

    Ok, now what if I want to exclude any applications that have " - Decommissioned" in the application name? Would I modify:

    =IF($A2="","",SUMPRODUCT((LOOKUP(ROW(Raw!$A$2:$A$100),ROW(Raw!$A$2:$A$100)/(Raw!$A$2:$A$100<>""),Raw!$A$2:$A$100)=$A2)*(Raw!$B$2:$B$100<>"")*(ISERROR(SEARCH("-",Raw!$B$2:$B$100))*Raw!C$2:C$100)))

    to read like this?

    =IF($A2="","",SUMPRODUCT((LOOKUP(ROW(Raw!$A$2:$A$100),ROW(Raw!$A$2:$A$100)/(Raw!$A$2:$A$100<>""),Raw!$A$2:$A$100)=$A2)*(Raw!$B$2:$B$100<>"")*(ISERROR(SEARCH(" - Decommissioned",Raw!$B$2:$B$100))*Raw!C$2:C$100)))

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Using VLOOKUP to pull values into another sheet then count

    No....

    =IF($A2="","",SUMPRODUCT((LOOKUP(ROW(Raw!$A$2:$A$100),ROW(Raw!$A$2:$A$100)/(Raw!$A$2:$A$100<>""),Raw!$A$2:$A$100)=$A2)*(Raw!$B$2:$B$100<>"")*(ISERROR(SEARCH("-",Raw!$B$2:$B$100))*Raw!C$2:C$100)))


    Red: it looks in column B for a hyphen. If it DOES NOT find a hyphen, it returns an error.

    Cyan: where it finds an error, this returns TRUE... and only those values (ones which have NO hyphen) go on into the rest of the formula. So...

    XXX - inactive
    XXX - decommissioned
    XXX - whatever

    will ALL be excluded.

    Clear? is that what you intended?

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

+ 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. Pull Column Values from Another Sheet that are in the Current Sheet
    By CodeInExcel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-03-2020, 12:37 PM
  2. [SOLVED] VLOOKUP to pull in duplicate values
    By Aredeekay in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 11-05-2019, 07:11 AM
  3. [SOLVED] Vlookup to pull values from 3 worksheets.
    By kreiner2006 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-05-2019, 02:10 PM
  4. Replies: 3
    Last Post: 03-21-2016, 02:01 PM
  5. Replies: 1
    Last Post: 04-20-2015, 03:18 PM
  6. Use vlookup or formula to pull multiple values
    By jcavigli in forum Excel General
    Replies: 3
    Last Post: 02-06-2013, 03:18 PM
  7. Need to pull multiple values from 1 workbook to another using vlookup?
    By jenmarie in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-30-2010, 02:38 PM

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