+ Reply to Thread
Results 1 to 4 of 4

VBA find and replace inside array formulas? Possible?

  1. #1
    Forum Contributor
    Join Date
    05-16-2013
    Location
    Dallas, Texas
    MS-Off Ver
    O365 with latest Excel
    Posts
    107

    Cool VBA find and replace inside array formulas? Possible?

    Is it possible to create some VBA to replace one part of an array formula? I'm concerned because of the whole shift-cntrl-enter thing.

    Current formula(s) - actually about 20 versions of this exact formula with a different cell reference other than K13

    {=SUM(IF((allbudgetentered[Goal]=K13),IF(allbudgetentered[Funding Source]="TARDIS",allbudgetentered[Amount],0)))}

    The only change I need to make is to the "TARDIS" part (I made it silly and Whovian just for fun while tweaking...but obviously it needs to read the appropriate funding source now - BORING!)

    Since I have several other changes that I need to make on several dozen spreadsheets, I'd like to add it to the other coding I have and just do the fixes all at once.

    So how can I replace every instance of "TARDIS" with something boring and adult like "Internal Revenue" or "Donations/In Kind"?


    PS - I still plan on using Doctor Who references during all of my building and tweaking.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA find and replace inside array formulas? Possible?

    Try something like this. It respects array formulas.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    05-16-2013
    Location
    Dallas, Texas
    MS-Off Ver
    O365 with latest Excel
    Posts
    107

    Re: VBA find and replace inside array formulas? Possible?

    AlphaFrog - that worked perfectly!

    Thanks much!

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA find and replace inside array formulas? Possible?

    You're welcome. Thanks for the feedback.

+ 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. Replace External Links with Values inside Formulas
    By k64 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-22-2015, 03:01 PM
  2. [SOLVED] Find and Replace for Inside Formulas
    By VICEROY in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-13-2013, 01:03 AM
  3. Find/Replace inside text string using a formula
    By SEMMatt in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-21-2013, 04:24 PM
  4. Find and replace one array with another
    By pvanderlinden in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-01-2013, 01:45 AM
  5. Use Array for Find/Replace
    By crazytonyi in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-29-2012, 07:30 AM
  6. Excel 2007 : Find & Replace can't find text in formulas
    By scdearnl in forum Excel General
    Replies: 1
    Last Post: 04-07-2011, 06:51 AM
  7. Find and replace from an array ?
    By twaccess in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-19-2009, 03:30 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