+ Reply to Thread
Results 1 to 2 of 2

Find and Replace text issues - need vb code

  1. #1
    Registered User
    Join Date
    01-19-2016
    Location
    Manchester, England
    MS-Off Ver
    2016
    Posts
    3

    Find and Replace text issues - need vb code

    Hi,

    I have a spreadsheet with 3 sheets.
    Sheet one is a list of products
    sheet 2 pulls 5 random products from sheet 1 and sheet 3 is a list of html code over 208 lines.

    an example of sheet 3 and a row of code:-


    What i have is a button that allows me to select 5 products off sheet one and the information associated with that row and then pastes that into sheet 2 and arranges data as i need it and does some calculations.
    all of this works fine using macros that i have made.

    i now need to replace to part of text from sheet three code with data from a specific cell. i want a button that will run through all the code identifying key specific words and replacing them with data from cells on sheet 2.
    So Button_Link_2 will be replaced with data from sheet 2 cell c2. this data will obviously change each time i select 5 different products. so using a macro to find and replace will not work.
    then replace src="./5 Products_files/Image_10.png" with a sheet 2 cell d2.

    Is there a way of doing what i am after rather than have to go through and find and replace over 40 different changes.

    Thanks in advance.

  2. #2
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: Find and Replace text issues - need vb code

    I think an easier way than doing replacements in your actual code would be to use a sheet in your workbook to list the formulas/Values to use, and change that sheet as the need arises. Your code would be able to change the values as needed and use them as needed.

+ 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. Excel 2016 issues: Adding sheets and find replace.
    By anrichards22 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-25-2016, 07:25 AM
  2. LEFT, RIGHT, FIND, Text String Issues
    By keith.will in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-08-2015, 05:50 PM
  3. [SOLVED] Search through columns and find specific text and replace that text with header column
    By adamzee in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-09-2014, 11:59 PM
  4. Macro - Find and Replace - LookAt Issues
    By drewmey in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 10-07-2014, 04:42 AM
  5. [SOLVED] Find and Replace Macro issues
    By Billy Dee in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-26-2012, 11:47 AM
  6. find in excel replace in word: find/replace text in text boxes and headers
    By dean.rogers in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2012, 12:40 PM
  7. Replies: 7
    Last Post: 03-03-2008, 11:48 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