+ Reply to Thread
Results 1 to 15 of 15

Idetify a specified number and delete it in a column

  1. #1
    Registered User
    Join Date
    02-18-2025
    Location
    Singapore
    MS-Off Ver
    Office 365
    Posts
    6

    Red face Idetify a specified number and delete it in a column

    I have a first column say named as 1 to 100. I want to enter a random number from 1 to 100 in the second column and the corresponding on the first column shall be deleted immediately. How do I write a formula to do this activity?

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

    Re: Idetify a specified number and delete it in a column

    Welcome to the forum.

    This can't be done with a formula - a formula is not capable of deleting data. Shall I move this to the VBA section for you?
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-18-2025
    Location
    Singapore
    MS-Off Ver
    Office 365
    Posts
    6

    Re: Idetify a specified number and delete it in a column

    Instead of deleting is it possible to change to zero. I am not familiar with VBA

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

    Re: Idetify a specified number and delete it in a column

    No, I am afraid not.

  5. #5
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,984

    Re: Idetify a specified number and delete it in a column

    Could maybe do with some additional context, otherwise why not use the inbuilt Find and Replace and enter a random number there?

  6. #6
    Registered User
    Join Date
    02-18-2025
    Location
    Singapore
    MS-Off Ver
    Office 365
    Posts
    6

    Re: Idetify a specified number and delete it in a column

    Thank you. Still need a programme it seems.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,167

    Re: Idetify a specified number and delete it in a column

    You cannot change anything in the source column with a formula. You could extract the remaining values elsewhere. But, given you want to generate a random number, I’m not sure what the recalculation would do/show.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,167

    Re: Idetify a specified number and delete it in a column

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

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

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

  9. #9
    Registered User
    Join Date
    02-18-2025
    Location
    Singapore
    MS-Off Ver
    Office 365
    Posts
    6

    Re: Idetify a specified number and delete it in a column

    Thank you very much. It works well. If the Column B has more than one number how to change this?

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

    Re: Idetify a specified number and delete it in a column

    Try this in C1.
    Please Login or Register  to view this content.

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,167

    Re: Idetify a specified number and delete it in a column

    This:

    =SEQUENCE(100)
    =RANDBETWEEN(1,100)
    =FILTER(A1#,A1#<>B1)

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

  12. #12
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,167

    Re: Idetify a specified number and delete it in a column

    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 (Next to 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 those who helped.

  13. #13
    Registered User
    Join Date
    02-18-2025
    Location
    Singapore
    MS-Off Ver
    Office 365
    Posts
    6

    Re: Idetify a specified number and delete it in a column

    Excellent and Thankyou very much. That resolved my issue.

  14. #14
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,167

    Re: Idetify a specified number and delete it in a column

    You're welcome. Thanks for the rep.



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

  15. #15
    Registered User
    Join Date
    02-18-2025
    Location
    Singapore
    MS-Off Ver
    Office 365
    Posts
    6

    Re: Idetify a specified number and delete it in a column

    Thank you for the suggestion. I have added reputations and marked the Thread as resolved. Great service and thanks for your guidance.

+ 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] How to delete columns (referring to column number)?
    By VAer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-18-2024, 10:19 PM
  2. [SOLVED] function required to idetify duplicate numbers
    By Karnik in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-26-2024, 10:03 AM
  3. [SOLVED] Delete Row where duplicate value in A column but leave first number
    By Patish in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-24-2016, 06:55 AM
  4. [SOLVED] Delete Row if There is a Duplicate Number in same Column
    By PaulLor89 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-14-2014, 01:52 PM
  5. [SOLVED] Delete rows if column A matches number and meets condition in another column
    By stokiejames09 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-05-2014, 05:03 PM
  6. Macro to delete first row and insert column after a certain number of column
    By arnab0711 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-26-2011, 08:36 PM
  7. Delete rows with a number in column A
    By grahamhurlburt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-24-2006, 04:21 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