+ Reply to Thread
Results 1 to 5 of 5

Help with replacing a numerical range with one value

  1. #1
    Registered User
    Join Date
    01-24-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Question Help with replacing a numerical range with one value

    Dear all,

    I have been trying to replace a range of numbers with one value, which initially did not seem like a complex request of excel. Either I am missing something really obvious, or it cannot be done with a simple Find/Replace request.

    What I am exactly trying to do: I have a spreadsheet streching across 17 columns with a variety of numercial values in some cells. Most of the cells however, are populated with the characters "nd". What I would like to do is to replace all numbers that are greater than or equal to 40 with the value "A", and anything under 40 with the value "B".

    Is this possible, and if so, how can I go about getting this little task done? Any advice would be muchly appreciated!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Help with replacing a numerical range with one value

    Hi Lechoz and welcome to the forum

    You could indeed use find/replace for this, but you would have to do it individually for each number.

    An alternative would be to use a formula in a "2nd" table next to your data, and use a formula like...
    =IF(ISNUMBER(A1),IF(A1>=40,"A","B"),"nd")
    copy this across and down, to cater for all rows/columns in your table

    You can then either leave the original data there (hide it if needed), or copy/paste values over it with the answers from those formulas. you can then delete all the forumulas
    (or you can wait for some-one to write some VBA code do do it for you )
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-24-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Thumbs up Re: Help with replacing a numerical range with one value

    Thanks for the welcome FDibbins. Also thank you for the help. It worked a treat! You have saved me a lot of mind numbing work, for which I am grateful. A bit slow cutting and pasting an 8K+ row data set, but much better than doing it all manually!

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Help with replacing a numerical range with one value

    Happy to help. If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below)

  5. #5
    Registered User
    Join Date
    01-24-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Help with replacing a numerical range with one value

    Thanks for the heads up. Done and done.

+ 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