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
Bookmarks