+ Reply to Thread
Results 1 to 9 of 9

data selection in a row can variable as per data availability

  1. #1
    Registered User
    Join Date
    01-22-2008
    Location
    qatar
    MS-Off Ver
    office 365
    Posts
    42

    data selection in a row can variable as per data availability

    Good evening friends,

    i have some data in a row ("row 8" in this case), this data is actually obtained through formula from previous rows. consider the "row 8" is

    Row (8) = a b c d e f g h i j k l
    Row (9) = l a k b j c i d h e g f


    i am using a formula in next "Row (9)", which is arranging the data in "row 8". As per the current "row (9)" formula, i have to make manual selection as per the "row 8" data (number of cells with data). Row 9 formula does not work if "Row 8" data varies (cells with data increase or decrease). can the "Row (9)" formula be changed in a manner that it also consider the data (number of cells with data) available in "Row 8"? the sample file is attached. thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,140

    Re: data selection in a row can variable as per data availability

    Do you mean this?

    =SORTBY(E8:P8,-ABS(COUNTA(E8:P8)-AVERAGE(COUNTA(E8:P8))+0.1))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    01-22-2008
    Location
    qatar
    MS-Off Ver
    office 365
    Posts
    42

    Re: data selection in a row can variable as per data availability

    yes exactly, AliGW. or any other method to consider data cells in "Row 8"

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,140

    Re: data selection in a row can variable as per data availability

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

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  5. #5
    Registered User
    Join Date
    01-22-2008
    Location
    qatar
    MS-Off Ver
    office 365
    Posts
    42

    Re: data selection in a row can variable as per data availability

    the formula is considering the data from E8:P8, if data changes to E8:Q8, then the formula will not consider the cell P9. the formula must also then switch to E8:Q8.
    your this formula
    =SORTBY(E8:P8,-ABS(COUNTA(E8:P8)-AVERAGE(COUNTA(E8:P8))+0.1))
    not solving the purpose
    Thanks
    Last edited by usamampk; 04-04-2021 at 06:26 AM.

  6. #6
    Registered User
    Join Date
    01-22-2008
    Location
    qatar
    MS-Off Ver
    office 365
    Posts
    42

    Re: data selection in a row can variable as per data availability

    Quote Originally Posted by AliGW View Post
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    the formula is considering the data from E8:P8, if data changes to E8:Q8, then the formula will not consider the cell P9. the formula must also then switch to E8:Q8.
    your this formula
    =SORTBY(E8:P8,-ABS(COUNTA(E8:P8)-AVERAGE(COUNTA(E8:P8))+0.1))
    not solving the purpose
    Thanks

  7. #7
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: data selection in a row can variable as per data availability

    Please try

    =LET(a,E8:Z8,b,FILTER(a,a<>""),c,SEQUENCE(,COLUMNS(b)),SORTBY(b,-ABS(c-AVERAGE(c)+0.1),))
    Attached Files Attached Files

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,140

    Re: data selection in a row can variable as per data availability

    Just extend the range to cover the maximum, e.g.

    =SORTBY(E8:P8,-ABS(COUNTA(E8:ZZ8)-AVERAGE(COUNTA(E8:ZZ8))+0.1))

  9. #9
    Registered User
    Join Date
    01-22-2008
    Location
    qatar
    MS-Off Ver
    office 365
    Posts
    42

    Re: data selection in a row can variable as per data availability

    Quote Originally Posted by Bo_Ry View Post
    Please try

    =LET(a,E8:Z8,b,FILTER(a,a<>""),c,SEQUENCE(,COLUMNS(b)),SORTBY(b,-ABS(c-AVERAGE(c)+0.1),))
    Thanks a lot. this solve the issue.

+ 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. Variable Data Selection between sheets
    By nferrante in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-25-2019, 02:59 PM
  2. Analyze data from a name-date-availability sheet
    By SMlLE in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-05-2017, 10:05 AM
  3. Complicated tracking sheet for shift selection and availability
    By ricunger in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-30-2014, 02:37 PM
  4. Replies: 2
    Last Post: 10-07-2013, 11:06 AM
  5. Maximum data availability time period considering data gaps...
    By hellojasmin12 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-09-2013, 05:34 AM
  6. Replies: 1
    Last Post: 05-30-2013, 09:37 AM
  7. Macro - Data Sort -Variable Selection
    By Frantic Excel-er in forum Excel General
    Replies: 3
    Last Post: 06-06-2005, 06:05 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