+ Reply to Thread
Results 1 to 11 of 11

Delete all the values that are to the right side with respect to a value that is stated

  1. #1
    Registered User
    Join Date
    06-26-2017
    Location
    India
    MS-Off Ver
    2010
    Posts
    81

    Delete all the values that are to the right side with respect to a value that is stated

    Hi all,
    Hope all is good.

    Actually, I had asked the below mentioned requirement in one of the forum. I had got a solution which was suggested by writing a VBA code.
    But I need solution in a formula manner instead of VBA code.
    Can anyone please help me in getting the formula ?

    The requirement being, I need only those values which are to the left of the value that is highlighted in red colour and including red coloured value.
    The values to the right of the red coloured value must not be displayed as shown in Column 'C' (Output Column).
    I have entered the values in Column 'C' manually just for my better explanation by considering Column 'B' as the input.

    Note:
    Just for my explanation I have highlighted one value in each row in Red colour. In actual, there won't be any colour. It will be in default colour as like the other values.
    Please see the attached excel file.

    Thank you all in advance in reading my request and for your attempts.
    Attached Files Attached Files

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Delete all the values that are to the right side with respect to a value that is state

    Formulas cannot see font color.

    What is the logic as to why the string should get cut off where you are showing?

  3. #3
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,192

    Re: Delete all the values that are to the right side with respect to a value that is state

    Then what are we searching for in the string?
    why is it A2 in line 1, but A2C in line 2?

    where do we split it? (with no color)

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,082

    Re: Delete all the values that are to the right side with respect to a value that is state

    Formulas cannot change cell values, you need VBA for that.
    You can make a cell equal the result of another cell using a formula, e.g. cell B1 can have a formula based on the value in A1 but the VALUE in A1 can only be changed by VBA.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  5. #5
    Registered User
    Join Date
    06-26-2017
    Location
    India
    MS-Off Ver
    2010
    Posts
    81

    Re: Delete all the values that are to the right side with respect to a value that is state

    Hi all,
    Thanks a lot for your quick response.
    Please see attached excel file for better understanding.
    Column 'C' in the attached excel file is based on formula.

    Thank you all once again.
    Attached Files Attached Files

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Delete all the values that are to the right side with respect to a value that is state

    What's wrong with the formula in column C? It seems to do exactly what you are looking for.

    Are you looking for something else?

  7. #7
    Registered User
    Join Date
    06-26-2017
    Location
    India
    MS-Off Ver
    2010
    Posts
    81

    Re: Delete all the values that are to the right side with respect to a value that is state

    I need formula to be developed for the workbook named Illustration.
    Thank you for the reply.

  8. #8
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Delete all the values that are to the right side with respect to a value that is state

    Enter formula in C2 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    See attached file
    Attached Files Attached Files
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  9. #9
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,192

    Re: Delete all the values that are to the right side with respect to a value that is state

    paste this code into a module.
    then run :aParseCells

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    06-26-2017
    Location
    India
    MS-Off Ver
    2010
    Posts
    81

    Re: Delete all the values that are to the right side with respect to a value that is state

    Hi all,
    Sorry for my delayed response. I am really very sorry.
    I am really thankful to all of you to your quick response and to your time in giving me a perfect solution. Thanks a lot!!!!
    Thank you Alkey to your awesome formula. You have given the formula which I was looking for and its really working fine.
    Thank you Ranman to your code. Its working good as well.

    Thank you all!!!!!

  11. #11
    Registered User
    Join Date
    06-26-2017
    Location
    India
    MS-Off Ver
    2010
    Posts
    81

    Re: Delete all the values that are to the right side with respect to a value that is state

    Hi Alkey,
    Hope you are doing good.

    The formula which you have given is working excellently.
    Now again I am stuck up. Can you please help me out once again ?

    If multiple look up values repeats in a single cell itself, the result must be such that, the value which exists first must only be present in the Output. The rest of the values has to be deleted.
    Please see attached the excel file for better clarity.

    Thank you once again in advance in solving my problem.
    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. [SOLVED] Only those values are required which are to the left of stated value
    By raju.r.083 in forum Excel General
    Replies: 12
    Last Post: 12-05-2017, 09:19 AM
  2. Generate rows in respect of values of a column
    By ROHAN999 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-06-2016, 11:07 PM
  3. Compare 2 sets of values in side-by-side Stacked Column chart
    By dlaudenschlager in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 03-21-2016, 01:34 PM
  4. Excel PivotChart, values don't respect filters?
    By sam452 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 08-26-2013, 03:13 PM
  5. Replies: 1
    Last Post: 07-26-2013, 09:49 AM
  6. [?] Align Identical Values side by side with a Macro
    By cadew in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-17-2012, 03:37 PM
  7. Replies: 0
    Last Post: 02-13-2009, 03:56 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