+ Reply to Thread
Results 1 to 3 of 3

Macro for replacing range of values with one value

  1. #1
    Registered User
    Join Date
    10-07-2010
    Location
    Delft, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    6

    Macro for replacing range of values with one value

    Hi there,

    I was wondering if anyone could help me out. I have a range of codes in my excel sheet which should be replaced with a different value. For example; codes A, B, and C should be replaced with the value 1. So i need a macro that can do this. Because the codes are not numeric, I can't use a range (i think?)

    Does anyone have an idea?

    thanks!

  2. #2
    Registered User
    Join Date
    10-07-2010
    Location
    Delft, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Macro for replacing range of values with one value

    thanks for the tip, I have attached a workbook to it with an example. The actual list is much longer
    Attached Files Attached Files

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Macro for replacing range of values with one value

    Not sure what you are trying to achieve, maybe try Vlookup
    =IFERROR(VLOOKUP(A2,'Old Situation'!$A$2:$C$8,3,0),"Not Found")

    Check out the example.
    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)

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