I've always used event driven functions - ie. user clicks a button and my function gets called.
What I want to do now is replace a HUGE formula that is impossible to debug with a function. So the idea is, any time the user changes any cell, the function should be called and update a certain cell with a new value.
Need assistance with the code for catching errors when using the find / replace function in excel? In particular, I am trying to write code to break to an error message when the value or string searched for isn't found in the find / replace. At the minute I have just copied the standard code using a macro and all this does is return a message box saying X entries replaced.
I'm wanting to use Excel's built in replace function to replace ANY date with "Call:"
I'm not going to go into details about why, but I cannot use a code, as I only want to change them at specific times.
The dates are currently formatted as 12/09/2009. So I need to change the 12/09/2009 and any other date there may be to "call:" without having to go through every possible date.
I need to get to those percentages (or close) the tricky part is when the numbers become negative. the forumla is actual revenue over planned revenue. If the actual revenue is below 0 and less than the planned revenue number than the attainment % should be a negative. However, if the actual revenue is below 0, BUT LESS THAN PLANNED revenue the percentage than becomes positive.
Trying to figure out how to write a formula to rank values in B if the values in A are the same? I tried rank(if(A2:A17=A2,B2:B17))but this did not seem to work.
I'm trying to sort out an accounts receivable ageing into various age categories For example, for a customer with 3 months credit term, i've used the formula =SUMIFS($C3:$AA3,$C$1:$AA$1,">=4",$C$1:$AA$1,"<=9") to sum up amounts that are 1 to 6 months past due. For the next age category 7 to 12 months past due i've used =SUMIFS($C3:$AA3,$C$1:$AA$1,">=10",$C$1:$AA$1,"<=15").
As my customers have different credit terms (30 days, 60 days etc), i've to adjust the above formula accordingly e.g. instead of ">=4", I'll have to change the criterion to ">=7". This is time consuming as i've got a long customer list.
Title: How do I add a condition to an IF and Vlookup Formula:
I need to edit a formula to include a condition. I attached an excel file for ease of explaining the problem. I want to say if $E$5 has “A to B” then F5 will automatically have BOR, but if E5 has anything else then the Vlookup formula applies.
I was thinking something along this formula: =IF(AND($E$5<>”A to B”,ISBLANK($B5),"",VLOOKUP($B5,'Drop Down'!$D$1:$E$500,2,FALSE)))
I know I need to add “BOR” in the formula above somewhere Where am I going wrong?
I am trying to display both text and a date in the same line. Currently I have something like ="The Date Is " & A1. where A1 is a cell with a date formatted in a preferred format. However, once I call reference to the cell, excel re-formats it into the serial date, so it displays something like. The Date Is 40220
instead of something like: The Date is 2/11/2010. Does anyone know how to format the number back into a date form? Just going through the format menus and setting it to date does not change it.
I'm working with a word table pasted into excel. The dashes in the word table paste into Excel (2003) as small boxes. I can use the find and replace function in Excel and in the Excel environment the replace function works. I recorded the replace function so I could develop the action in VBA. The recoded action does not work. The data I've pasted in below looks fine, however when pasted into Excel all of the "-" paste in as small boxes. When I used the chr function the chr code equals 63 which is "?". I used chr(63) in the replace function. This causes the VBA replace function to replace all characters in the file with dashes. I've tried several other codes (127,129,141,143,144,157) (none worked) based on the following website:
[url]
Cells.Replace What:=Chr(63), Replacement:="-" 'finds and replaces the - that converted to boxes
I can paste in the data using paste special "unicode text" but I loose the strike through formating which I need to identify obsolete data.
I was trying to help another user and came across this problem.
In cell A1 I have "abcd" In cell A2 I have =REPLACE(A1,4,1,"e") resulting in "abce" I tried to use = REPLACE(A1,RIGHT(A1,1),1,"e") but get #VALUE! I am wanting to use RIGHT because the number of characters is unknown.
I am working with a lot of data and have been making a table of statistical analysis for several rock types. I have it worked out to where i can filter the data and with the use of a bunch of IF functions, below, and it keeps everything the way I want.
The problem is I have to introduce new rock types, but if I just copy the formulas over i then have to go through hundreds of cells and switch sedimentary rocks to volcanic or whatever new class i have.
How this can be done faster. Maybe some way to say "find "text" within this range and replace" i can do it for actual values but when its embedded in a function im not sure.
I m using SUBSTITUTE function to replace commas with fullstop so I can multiply the end result with a number. But when I try to multiple for example B2 (0.1831) with 5, i get the VALUE! error.
Value Real Value (after substitute function) 0,1831 0.1831 23,3333 23.3333 12,5199 12.5199 5,5000 5.5000 20,5999 20.5999 24,4671 24.4671 200,0000200.0000 2,5386 2.5386 0,4000 0.4000 1,5019 1.5019
how I can resolve this so I can use the real values for computations (eg Real value *5), without having the VALUE! error message.
Plan numbers are contained in Row 1 (1518, etc). Options are listed in Column A (L101, L102, etc). I want to add the costs of each option, resulting in the total and each option code only listed once, with that total, below each plan. Example:.......
I am working on a spreadsheet which contains a number of reference data sheets (named “Reference data 2009”, “Reference data 2010” etc). As their names suggest, these sheets contain reference data applicable to the particular year. This reference data is used to perform various calculations in a “Calculations” sheet. On the “Calculations” sheet, the user specifies the year for which they wish to perform calculations. At present, I am using the volatile INDIRECT function to perform various HLOOKUP calculations along the following lines:
The reason I'm using the INDIRECT function is to identify the sheet with the appropriate year (hence "Reference data"&'Detailed method'!$C$2&'Detailed net pay calculations'!D1 which could be interpreted by Excel as "'Reference data 2009NEW" or "'Reference data 2010", depending on whether there's text in cell D1).
My query The function I'm using is working perfectly fine but I am wondering if it is possible to replace the INDIRECT function (in red) with INDEX or another non-volatile function in order to reduce the performance impact (I have a fairly large number of these types of functions).
Here is the situation: - Large block of text in one cell (1000+ words). - I use the Find & Replace function (from the top menu) to find a specific word that may appear several times within the cell. - Excel "highlights" the cell... but not the word specifically so I have to read all the text to find that word throughout the cell.
I'm receiving this message when I attempt to use the Find, Replace function. Formula is too long". I have a column of cells containing text only. ( about 2-3 paragraphs worth) I'm trying to replace a name with another name, which works fine where the cell contains a single or few sentences, but fails to replace when the cell contains too much information.
I am trying to create a function that will evaluate a cell, lets call it B10, and depending on this numeric entry input data in cell ranges B14,B22.
What I am trying to do is create a list of locations for a packing slip that when I enter the corresponding location number (i.e. 200) that it will populate the shipping address in B14,B22.
Any way to use a find and replace function involving a cell reference. I have a spreadsheet with ton of junky text burying information that I want. Here is a simplified example
A B Book 345353hg dgdgsdgfd fff Book belongs to Jim Sneaker fdg4 Sneaker is worn by Jan Gum dfg s d e te4345Gum tastes great Cake jklsjflsjfjikCake smells delicious
The pattern is that the A1 text appears in the B2 text. What I want is
Find *A1 Replace with blank Find *A2 Replace with blank and etc.
So that in the end, I get this:
B2 belongs to Jim is worn by Jan tastes great smells delicious
I've looked at the functions of find, replace, substitute, left, and right and I can't seem to find the right one to do what I need.
I am using a macro to find a value in a cell and if found, replace the value in the cell to the left. Thr macro works fine - unless the value I am searching for does not exist. The answer is ( Ithink) an IF statement, but I am having problems with the errors, when I try the IF.
The macro below blows up at the ActiveCell.Offset(0, -1) = "109073X line with an error "Run-time error "1004" - Application-defines or object-defined error.
I've tried a number of things I've seen from this board but have not found a way past the error.
If the value is found, the macro moves to the else statment and stops at the ActiveCell statement with the above error. If the value is not found, then the macro goto NotFound.
Sub Macro2() ' 'Range("A1").Select 'Start from the home cell Dim ValueFound As Object Set ValueFound = Cells.Find(What:="Cirrus Reversals/CREDITS") If ValueFound Is Nothing ThenGoTo NotFoundElseActiveCell.Offset(0, -1) = "109073X"'ActiveCell.FormulaR1C1 = "109073X"End If NotFound: End Sub
Trying to put together a macro that looks down active sheet for all cells that contain a value, sets a print area and then prints !
Is this possible?
FYG, I have a column that run from 3 - 2000, which contains a formula, which may produce a value depending on corresponding cells.
I used this code from a post on a similar topic, but excel is complaining code in bold
Private Sub Print_Area_Click() Dim lastCell As Range Set lastCell = Cells.SpecialCells(xlCellTypeLastCell).Offset(1, 0) Do Until Application.Count(lastCell.EntireRow) 0 Set lastCell = lastCell.Offset(-1, 0) Loop ActiveSheet.PageSetup.PrintArea = Range(Cells(1, 1), lastCell).Address End Sub
I have two sheets. One is named sheet1 where all my data is and sheet2 where all my values are. I want to do a find a replace on column N (sheet1) using the data in sheet2. Column A on Sheet2 has all the values that are found in column N and column B on Sheet2 has what the data should change to.
So for example:
Sheet1 says the following on column N: cat dog lion bear
Sheet2 says: Column A A1: Cat A2: Dog A3: Bear
Column B B1: 2 B2: 8 B3:15
I want the values on column N to be replaced with 2, 8, 15 and so forth. I use excel 2010.
I'm getting a Sub or Function not defined error on the code below. It highlights the Replace Function as the problem, have also tried the substitute function too with the same result.