Results 1 to 4 of 4

Need to find/replace a certain instance of number within column of formula.

Threaded View

  1. #1
    Registered User
    Join Date
    10-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    2

    Need to find/replace a certain instance of number within column of formula.

    Hi all

    This is my first post on this forum so apologies if it is not in the correct place or has been answered but I could not find a solution.

    I use a piece of software at work that outputs data into an excel spreadsheet. Usually at the end of a job I spend a few hours reformatting the spreadsheet so decided to set up some simple recorded macros (not able to write them myself) to speed the process. Most of these are fairly straight forward but I am stuck on this one.

    The original output shows results that haven't been run as -1 or -2 depending on the section so I have used a simple find and replace macro to replace them all with n/a as seen in the example. This however affects the functions that use info from those cells. I would therefore like to be able to use find and replace to edit a certain part of those functions. For this example I will refer to columns F, H & I. Please also note that the top two rows contain formula that I have amended to suit our own needs.

    So take rows 10 & 11 as the example, F10 has been changed from -1 to n/a which has affected the formula in F10/11 which reads =IF((F10=0), 0, F11/F10) (please note at this point that instances of 0 should show -1 for the formula to truly work but does not), I would like to use find and replace to change this to =IF((F10="n/a"), "n/a", F11/F10) but my limited knowledge efforts have returned similar but also the 0 in F10 has been replaced. So the question (bet you thought I'd never get there) would be is it possible to specify certain instances of 0 within the formula to change to n/a without affecting the instances in the F10's or to have it replace any of the cells within the searched column that contain a formula (there are blank rows that will vary in position and frequency from project to project) with the formula stated in H1/2 but obviously using the data from the corresponding rows?

    Hope that makes sense and isn't too long winded.

    I am aware that most of you would find this childs play in terms of writing VBA macros but please bear in mind that when I read said macros it is the equvilant of a pig reading latin and I would hope to use the results in a similar manner for different aspects of the spreadsheet .

    Many thanks in advance

    Steve
    Attached Files Attached Files

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 first instance of word Only
    By ScabbyDog in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-18-2013, 01:14 PM
  2. [SOLVED] find and replace for instance
    By nicktater in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2013, 04:42 PM
  3. [SOLVED] Lookup Table to Find/Replace Every Instance of a String (2/2)
    By Baghel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-04-2013, 05:49 AM
  4. Replies: 12
    Last Post: 12-31-2012, 04:13 AM
  5. Find the First Instance of a Number
    By Phillycheese5 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-18-2008, 10:59 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