+ Reply to Thread
Results 1 to 22 of 22

Choosecols and filter

  1. #1
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Choosecols and filter

    Hi,
    Recently I had used the formula
    Choosecols(Filter(Ram!C5:R971,(Ram!E5:E971<>0)+(Ram!K5:K971)),1,2,3,9)

    The output of second column contains numbers within braces for eg
    ABC Pvt.Ltd,London (365489018)
    but require - ABC Pvt.Ltd,London
    so,how to modify in above formula such that it gives the result of 2nd column excluding braces that contains number also char(38)
    Last edited by paradise2sr; 04-07-2024 at 11:44 PM.

  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. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,085

    Re: Choosecols and filter

    How about (untested):

    =LET(f,FILTER(Ram!C5:R971,(Ram!E5:E971<>0)+(Ram!K5:K971)),t,TEXTBEFORE(INDEX(f,,2)," ("),HSTACK(INDEX(f,,1),t,CHOOSECOLS(f,3,9))

    If you want further assistance, provide a sample workbook.
    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
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Choosecols and filter

    Thanx Ali,
    It seems to have been working.Sometimes there are some data in which there are no braces and numbers enclosed.For eg

    Jay Mata Di Udhyog Pvt. Ltd. <Here there no braces or is numbers enclosed in braces>

    and I want this as well to pull by the formula as - Jay Mata Di Udhyog Pvt. Ltd.

    besides #Post1 mentioned case as currently using your respected formula is giving #N/A error when my 2nd column.

  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. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,085

    Re: Choosecols and filter

    Provide a sample workbook. Include examples of ALL types covering ALL eventualites.

    Do NOT drip feed information.

    I shall not help further until you have made an effort to provide a suitable sample set of data.


  5. #5
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,085

    Re: Choosecols and filter

    Waiting for a sample workbook ...

  6. #6
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Choosecols and filter

    Ok Pls find the attached file.
    Attached Files Attached Files

  7. #7
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,085

    Re: Choosecols and filter

    WHERE are your EXPECTED results?

    And WHY am I having to prompt you for them? You have been a member here for long enough to undestand what is required. Please STOP wasting our time!!!

    I shall have a look when, and only when, expected results have been added.

  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. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,085

    Re: Choosecols and filter

    OK - I'll make ONE guess:

    =LET(f,FILTER(Ram!C5:R971,(Ram!E5:E971<>0)+(Ram!K5:K971)),t,IFNA(TRIM(TEXTBEFORE(INDEX(f,,2),"(")),INDEX(f,,2)),HSTACK(INDEX(f,,1),t,CHOOSECOLS(f,3,9)))

  9. #9
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Choosecols and filter

    Sorry for that,since there was only a minimal change required so I did not posted the expected result.PFA revised with expected result.
    Attached Files Attached Files

  10. #10
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,085

    Re: Choosecols and filter

    So did you even bother to try post #8? Or are you REALLY expecting me to copy and paste it into the workbook for you? (Hint: I'm not offering to do so).

  11. #11
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,008

    Re: Choosecols and filter

    Try this,

    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Choosecols and filter

    Quote Originally Posted by AliGW View Post
    WHERE are your EXPECTED results?

    And WHY am I having to prompt you for them? You have been a member here for long enough to undestand what is required. Please STOP wasting our time!!!

    I shall have a look when, and only when, expected results have been added.
    No,its not required.I have now tested it has worked.
    Thanx for the help.

  13. #13
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Choosecols and filter

    One last thing,how the formula would be revised if the extracted data last two column data are same.If you see in Expected Result sheet,col D & Col E value are same in 6th & 9th row.So I want to extract 6th & 9th row only.
    Last edited by paradise2sr; 04-08-2024 at 06:55 AM. Reason: 6th row is also same which I failed to mentioned

  14. #14
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,008

    Re: Choosecols and filter

    Try this,

    Please Login or Register  to view this content.

  15. #15
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Choosecols and filter

    Pls see the Expected Result2 sheet B:E
    Attached Files Attached Files

  16. #16
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,008

    Re: Choosecols and filter

    Try this,

    Please Login or Register  to view this content.

  17. #17
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,085

    Re: Choosecols and filter

    Quote Originally Posted by paradise2sr View Post
    No,its not required.I have now tested it has worked.
    Thanx for the help.
    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) 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 each of those who offered help.

  18. #18
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Choosecols and filter

    Quote Originally Posted by windknife View Post
    Try this,

    Please Login or Register  to view this content.
    Thanx it has worked.Can u add ABS function for negative values.

  19. #19
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,008

    Re: Choosecols and filter

    How about this?

    Please Login or Register  to view this content.

  20. #20
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Choosecols and filter

    Didnot worked out.Pls see the formula with your formula above and below is the expected result in Expected Result sheet.
    Attached Files Attached Files

  21. #21
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,085

    Re: Choosecols and filter

    It's wrong. Try this:

    =LET(f,FILTER(Ram!C5:R971,(Ram!E5:E971<>0)+(Ram!K5:K971)),t,IFERROR(TEXTBEFORE(INDEX(f,,2),"("),INDEX(f,,2)),u,HSTACK(INDEX(f,,1),t,ABS(INDEX(f,,3)),ABS(INDEX(f,,9))),IFERROR(FILTER(u,INDEX(u,,3)=INDEX(u,,4)),""))

    I hope that you are not going to continue adding extra requirements. Please read post #4 again.

  22. #22
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Choosecols and filter

    That's great mam.Its awesome.

+ 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. UNIQUE and CHOOSECOLS return 0 for blank cells
    By varbergt in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-29-2024, 09:29 AM
  2. [SOLVED] Can anyone tell me the difference between using Choosecols and Index?
    By FT00 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 01-02-2024, 11:24 AM
  3. Sorting Results from VSTACK, FILTER with CHOOSECOLS
    By drvs in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-28-2023, 03:51 PM
  4. Take,ChooseCols,Sort Function Not Showing Output In A Particular Cell
    By quentinlemmer in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 07-07-2023, 08:52 AM
  5. CHOOSECOLS and add a blank column
    By elischwa in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-17-2023, 02:26 AM
  6. Replies: 2
    Last Post: 10-24-2021, 08:03 AM
  7. Need to filter a report filter based on the previous filter
    By elliotencore in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-28-2014, 07:44 AM

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