+ Reply to Thread
Results 1 to 5 of 5

How to select specific records without filtering

  1. #1
    Registered User
    Join Date
    10-24-2012
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    25

    How to select specific records without filtering

    Hi,

    I have a table with thousands of lines and several columns. One column is the item's name, and another column is the price. Sometimes the user needs to amend the price por a particular item, so that all lines in wich the item is found, its price is changed to the new value.

    I can do that by creating an userform with two fields, one for the item name and another for the value that must be filled out by the user. Then the macro will filter by item and will replace all visible price cells with the new value.

    However this process is quite slow, as the table contains thousand of records, and it takes time when filtering and de-filtering. Is there any other way to replace automatically the old value with the new one for a specific item without filtering??

    Thanks in advance,
    Last edited by shardin; 10-27-2012 at 07:13 AM.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: How to select specific records without filtering

    Hi, shardin,

    as an alternative you may look at the Find-Method: search for the item, build a range (using Set, compare range to Is Nothing, Union) depending on the cells in the column to change and then change the range to the altered price.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    10-24-2012
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: How to select specific records without filtering

    This sounds quite good Holger, but could you give me any example about this?

    Thanks in advance,

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: How to select specific records without filtering

    Hi, shardin,

    the basic pattern may look like this (without the values from your textbox for item to search for or altered price, looking up Column H in ActiveSheet and altering the value in Column B thereafter):

    Please Login or Register  to view this content.
    HTH
    Holger

  5. #5
    Registered User
    Join Date
    10-24-2012
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: How to select specific records without filtering

    It works fine Holger.

    Thanks very much for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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