Find & Replace Macro

  • Hi, I need some help please with a Macro that will run through a spreadsheet and perform a find a replace, but I need to be able to build a list of possible words and replace them with a newer version of these.


    I have created a spreadsheet with named range lists, unfortunately these lists have had to be change and rather than change every sheet would prefer to use a macro that could change the data within the sheets, the data will be copied from the old sheets into the new sheet, as some of the columns have changed as well, I would then like to be able to run the macro to update the cell values.


    E.g.


    old Value | New Value
    2 | 2-High
    Test | Testing


    Any help would be really appreciated.


    Thanks


    Nick

  • Re: Find & Replace Macro


    It's not clear to me how you would know to replace Apple on sheet Old Version with Apple 1 on sheet New Version by looking at sheet Lists. Why not banana 5 or Pear 7?

    [SIZE=1]Entia non sunt multiplicanda sine necessitate.[/SIZE]

  • Re: Find & Replace Macro


    Sort of, I have lists on the old version, but they have been updated to new lists in a new version. I will be copying the data from the old version into the new version and as far as I am aware it will not update the data that has already been selected from the old list, so I just need a quick way of updating the data once it is copied across, I assumed a macro, but if anybody has a better way of doing it please let me know.


    Sorry for my poor explanation.


    Nick

  • Re: Find & Replace Macro


    Sorry, that didn't help.


    If you were a macro reading the first sheet, explain the logic you would use to arrive at the second sheet.

    [SIZE=1]Entia non sunt multiplicanda sine necessitate.[/SIZE]

  • Re: Find & Replace Macro


    Sorry I meant work books, I kept them in one for the demo.


    So it will be data copied from the old workbook to a new one, where the list values have now changed.


    Nick

  • Re: Find & Replace Macro


    OK, once more:


    If you were a macro reading the first WORKBOOK, explain the logic you would use to arrive at the second WORKBOOK.

    [SIZE=1]Entia non sunt multiplicanda sine necessitate.[/SIZE]

  • Re: Find & Replace Macro


    erm....The data in the first work book will be copied into the second work book, this data is then to be loaded into another piece of software, as I tried to explain before some of the lists in the first version of the spread sheet have been updated in the new version, hence the need for a macro...hope this explains it better.


    If not I will post the actual sheets tomorrow once I get to work, then I am sure all will become clear, thanks for your help so far though.


    Nick

  • Re: Find & Replace Macro


    OK, I'll look for it then. To be clear, what's missing is any notion of what findstring and replacestring are.

    [SIZE=1]Entia non sunt multiplicanda sine necessitate.[/SIZE]

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!