+ Reply to Thread
Results 1 to 11 of 11

Sort entries in one column dynamically & extract data based on rank

  1. #1
    Registered User
    Join Date
    10-02-2018
    Location
    Yamunanagar,India
    MS-Off Ver
    2010
    Posts
    35

    Sort entries in one column dynamically & extract data based on rank

    Moderator note: This thread originally posted in Excel Formulas & Functions. Moved here at OP's request.
    -- FlameRetired


    Greetings!!
    I'm facing a problem where I have to extract data from Sheet1 to Sheet2.

    Sheet 1 contains item code, it's quantity & other conditional data in columns C, D, E which may be delivered using formulas or entered manually.

    If all conditional data in C, D, E column for that item code is OK, then "clear " appears in column F in that row.

    As soon as " clear" appears in the cell, data in column A, B from this row should be extracted to sheet2.

    Later if conditional data in either of column C, D, E for that row is not met, extracted data should be removed from sheet2 & data in sheet 2 should be rearranged without leaving blank rows in sheet2.

    Attached is a sample file where I've shown the expected scenarios.

    I've been able to solve data extraction & rearrangement of data in sheet2 by using formula( also in the attached file), but only if I get a rank in sheet1, based on when "clear" appears in sheet1 in F column of a particular row. This part I'm unable to solve.
    Last edited by FlameRetired; 04-18-2019 at 04:37 PM.

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Sort entries in one column dynamically & extract data based on rank

    In A3 of sheet 2 then copied across
    Please Login or Register  to view this content.
    Last edited by kvsrinivasamurthy; 04-03-2019 at 11:35 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  3. #3
    Registered User
    Join Date
    10-02-2018
    Location
    Yamunanagar,India
    MS-Off Ver
    2010
    Posts
    35

    Re: Sort entries in one column dynamically & extract data based on rank

    Thanks for the reply.
    It seems you're using the rank given in the column H in your formula.
    This rank is to be generated first, then only your formula will be useful.
    My query itself was, how to generate this rank in column H.

  4. #4
    Registered User
    Join Date
    10-02-2018
    Location
    Yamunanagar,India
    MS-Off Ver
    2010
    Posts
    35

    Re: Sort entries in one column dynamically & extract data based on rank

    Should I rephrase the query & move it to VBA forum?

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,556

    Re: Sort entries in one column dynamically & extract data based on rank

    Perhaps this could be a consideration. Instead of marking one in a cell when a condition is met use a timestamp.
    The keyboard shortcut for dates is Ctrl + ;
    The keyboard shortcut for times is Ctrl + Shift + ;
    The keyboard shortcut for date and time (as modeled) is Ctrl + ; then space then Ctrl + Shift + ;
    The option you use would depend on how closely in time the conditions would be met.
    Column F is populated using: =IF(AND(C3>0,D3>0,E3>0)=TRUE,"clear","")
    Column G is populated using: =IF(F3="","",MAX(C3:E3))
    Column H is populated using: =IF(F3="","",RANK.EQ(G3,G$3:G$11,1))
    The formulas in columns J:K now reference column H.
    Test by deleting the date time stamp in D3
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Registered User
    Join Date
    10-02-2018
    Location
    Yamunanagar,India
    MS-Off Ver
    2010
    Posts
    35

    Re: Sort entries in one column dynamically & extract data based on rank

    Thanks for the reply & regret for late response.
    I just visited forum today after so many days.
    I'll check it & reply.
    Also just before seeing this post, I started a new query for the same problem in VBA forum.
    Hope you can help.

  7. #7
    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: Sort entries in one column dynamically & extract data based on rank

    Quote Originally Posted by GAURAVVOHRA View Post
    ... Also just before seeing this post, I started a new query for the same problem in VBA forum.
    Hope you can help.
    Please don't do that. It is called double posting. If you feel the existing thread may call for a VBA solution state so in this (the original) thread. If you feel it is more appropriate for the VBA section ask an Administrator or Moderator to move it for you.

    Below is the canned message for double posting. In this case I will close the duplicate and let this one stand until you deem it otherwise.

    I'm sure you understand.

    Administrative Note:

    Welcome to the forum.

    Unfortunately, this is a duplicate thread, and you are allowed only ONE thread per issue here. I am, therefore, closing this thread, but you may continue here in the original thread: link to be added here
    Last edited by FlameRetired; 04-14-2019 at 02:47 PM.
    Dave

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,556

    Re: Sort entries in one column dynamically & extract data based on rank

    I am not versed in VBA. To get a code based solution, you may wish to ask Dave or one of the other moderators/administrators to move the thread over to the Excel Programming / VBA / Macros forum for you.
    I hope that you have a blessed day.

  9. #9
    Registered User
    Join Date
    10-02-2018
    Location
    Yamunanagar,India
    MS-Off Ver
    2010
    Posts
    35
    I'ld request to the administrators to kindly move this query to VBA Section.

  10. #10
    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: Sort entries in one column dynamically & extract data based on rank

    Done.______________

  11. #11
    Registered User
    Join Date
    10-02-2018
    Location
    Yamunanagar,India
    MS-Off Ver
    2010
    Posts
    35

    Timestamp , If multiple conditions in different cells in a row are true

    I'm preparing a sheet where there are multiple columns. For each row, cell in column L should have a timestamp when multiple conditions for data in other columns of same row are true.
    I've tried this with Formula, but no result.
    I'm totally unaware of VBA, can anyone help me with the code.
    Refer attached file for the conditions & the manner in which data is appearing in different cells.
    Also for one particular condition I've written in both table & sheet format, will be great if I can get get help with both formats.
    Attached Files Attached Files

+ 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: 4
    Last Post: 08-17-2017, 02:22 AM
  2. Rank entries based on values and dates
    By sebroa in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-17-2017, 03:07 PM
  3. [SOLVED] Extract related data from a second column from repeated entries in a first column
    By pachorradas in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 08-31-2015, 02:41 PM
  4. Replies: 0
    Last Post: 06-03-2015, 01:33 PM
  5. Replies: 4
    Last Post: 06-11-2014, 10:39 AM
  6. [SOLVED] Data Manipulation: How to dynamically filter and sort a multi-column data set
    By deturnbull in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 04-12-2013, 05:35 AM
  7. moving data onto row/ column chart i boxed and sort and rank things?
    By vjachim in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-06-2011, 04:00 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