+ Reply to Thread
Results 1 to 8 of 8

Lookup in a range of cells and extracting cells based on values and criteria

  1. #1
    Registered User
    Join Date
    11-02-2016
    Location
    Durban, South Africa
    MS-Off Ver
    Office 2016
    Posts
    4

    Lookup in a range of cells and extracting cells based on values and criteria

    Hi there,

    Please be gentle with me, I am no Excel guru hence to request to you guys for higher power...

    Basically I want to list the instances where I have a user-name in column C = BHE (for example) and then the row with a value of Acct-Input-Octets in column C has a value greater than 4000. I need to find all instances of these occurrences, and ideally add then together as well.

    The complexity of this is that I have a number of rows with a timestamp and I have look within all those rows with a common timestamp as my Acct-Input-Octects and the username are on different rows.

    Hopefully the fields I created within the attachment make my explanation make more sense..

    I dont even know if it's possible, but hopefully it is - took me the whole day yesterday to do it manually and I've lost the will to live to do it again next month..


    Hope you guys can help.

    Regards
    Andrew
    Attached Files Attached Files

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Lookup in a range of cells and extracting cells based on values and criteria

    If I have understood your requirement correctly, then you could use a macro to cycle through your data, and output the results you want:
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    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: Lookup in a range of cells and extracting cells based on values and criteria

    Hi Andrew and welcome to the forum.

    I am not sure how "BHE" would factor in the rest of the criteria. Perhaps this will give you a good start with the rest.

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

  4. #4
    Registered User
    Join Date
    11-02-2016
    Location
    Durban, South Africa
    MS-Off Ver
    Office 2016
    Posts
    4

    Re: Lookup in a range of cells and extracting cells based on values and criteria

    Thanks Olly - worked perfectly

  5. #5
    Registered User
    Join Date
    11-02-2016
    Location
    Durban, South Africa
    MS-Off Ver
    Office 2016
    Posts
    4

    Re: Lookup in a range of cells and extracting cells based on values and criteria

    Hi Olly,

    I replied as solved but just realized that this gave incremental information, and I actually only need to add instances where the Acct-Status-Type is equal to Stop.
    I also need to include the Acct-Output-Octets with a value above 4000 - this would be an 'or' statement of some sort I guess - so if either Acct-In 'OR' Acct-Out >4000 AND Acct-Status = Stop then record the entry - am I asking too much?


    Thanks again for your help
    Last edited by A_W; 11-03-2016 at 05:08 AM.

  6. #6
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Lookup in a range of cells and extracting cells based on values and criteria

    No problem - try this:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    11-02-2016
    Location
    Durban, South Africa
    MS-Off Ver
    Office 2016
    Posts
    4

    Re: Lookup in a range of cells and extracting cells based on values and criteria

    You are a genius!! thanks again - does the trick...

  8. #8
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Lookup in a range of cells and extracting cells based on values and criteria

    Happy to help Thanks for the feedback

+ 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. [SOLVED] Extracting data from cells based on criteria in other cells
    By PaulMcCudden in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-21-2015, 02:56 PM
  2. Extracting data from a range that changes daily based on a cells criteria
    By JohnnyBoyxxx in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-02-2014, 02:35 AM
  3. Replies: 4
    Last Post: 06-13-2014, 07:08 PM
  4. [SOLVED] lookup a range of cells and populate specific cells based on matching data
    By RobertM01 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-23-2014, 08:18 PM
  5. [SOLVED] Formula Needed to count a range of cells based on criteria in 2 other cells
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-01-2013, 04:06 PM
  6. define range of cells based on values that appear on other cells
    By vpappasmet in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-23-2013, 07:11 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