Results 1 to 4 of 4

Using Cell Reference in VBA Find/Replace

Threaded View

  1. #1
    Registered User
    Join Date
    07-27-2016
    Location
    Evansville, IN
    MS-Off Ver
    2010
    Posts
    2

    Using Cell Reference in VBA Find/Replace

    Hi all,

    First post to the forum. Basic Excel skills and no VBA experience. I'm wanting to use a cell value as part of a string in a Find/Replace script. Here's what I have so far...

    Worksheets("Sheet1").Cells.Replace _
    What:="archive[*]", Replacement:="archive[xxx]", _
    SearchOrder:=xlByColumns, MatchCase:=False

    What I need to do is use the contents of cell I2 to populate the xxx (I only used xxx as a placeholder for this post). In other words, if I enter a 3 into I2, I want to find any occurrence of 'archive[*] in Sheet1 and replace it with 'archive[3]'. I've tried countless ways to do this, using results from Google searches. Apparently I'm not using the correct terms to get the results I need.

    BTW, I just signed up for an online VBA course, as my job now requires me to know both. Unfortunately, I really need to get this spreadsheet done before this class starts.

    Thanks in advance for any help. This forum has been a great tool for me so far.

    -Cheapskate2
    Last edited by cheapskate2; 07-27-2016 at 06:00 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] find and replace cell reference to a new worksheet
    By Johnny Van in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  2. find and replace cell reference to a new worksheet
    By Johnny Van in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 AM
  3. find and replace cell reference to a new worksheet
    By Johnny Van in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 AM
  4. find and replace cell reference to a new worksheet
    By Johnny Van in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 AM
  5. [SOLVED] find and replace cell reference to a new worksheet
    By Johnny Van in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  6. find and replace cell reference to a new worksheet
    By Johnny Van in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  7. find and replace cell reference to a new worksheet
    By Johnny Van in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  8. find and replace cell reference to a new worksheet
    By Johnny Van in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-22-2005, 11:05 PM

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