Excel Number like a certain number Replace - excel

Excel is trying to "smartly" change certain numbers in my formula for me.
Some of which make sense, some of which do not.
Is there a fast way I can do a number replace for any number that is close to the number I want to replace?
Example:
All these numbers I want to replace to A2:A2000:
A8:A2006
A9:A2007
A10:A2008
A11:A2009
Is there a fast way I can do that with control+H?

Scott Craner's reply is the answer:
in your first formula you would lock the reference by making it absolute using the $ notation: $A$2:$A$2000 now as the formula is dragged/copied down or over the reference will remain the same. –

Related

How do you to find missing numbers in a row

I have a Row and the range is B2:B10 and the numbers are from 1 - 9. At random about 1/2 of those numbers will be placed in this Row and need the formula to tell me what numbers are missing. Of course, I can simply look and tell what they are but would like for the formula to let me know. When you ask this question on the Internet it gives the solution for Columns and not Rows. I know this involves an array, but haven't quite mastered that yet.
Thanks.
=TEXTJOIN(",",,IF(ISERROR(MATCH({1,2,3,4,5,6,7,8,9},B2:B10,0)),{1,2,3,4,5,6,7,8,9},"")) should work if a you need a list of numbers not included.
So, for large number it is hard to hardcode numbers in array. You may like this dynamic approach where you do not need to hardcode numbers rather you can just use SEQUENCE() function (if your Excel have it) to define how many numbers you want to check. Try-
=TEXTJOIN(",",TRUE,IF(ISERROR(MATCH(SEQUENCE(20),B2:B10,0)),SEQUENCE(20),""))

Is there a way to add counting up numbers to the end of duplicate data in excel?

I am working with a lot of ISBN's for a library system for my work. We have a few duplicate books and I am looking for a way to have excel add .0 .1 .2 etc. for each duplicate. I am wondering if this is possible and if so how do I do it? I have tried to use concatenate within an if that uses counta to determine if it has shown up yet. I need to know what to do. I would prefer not hard code them in.
I used the following data set to demonstrate my solution:
In cell A2, enter the following formula and drag it down:
=LEFT($B2,4)&RIGHT($F2,4)&IF(COUNTIF($F$2:$F$9,$F2)>1,"."&(COUNTIF($F$2:$F2,$F2)-1),"")
There are three parts of this formula, first part is LEFT($B2,4) which extracts the first four letters of the subject code; second part is RIGHT($F2,4) which extracts the last four digits from the ISBN code;
third part is IF(COUNTIF($F$2:$F$9,$F2)>1,"."&(COUNTIF($F$2:$F2,$F2)-1),"") which is firstly using COUNTIF to find out if there is duplicated ISBN code, if so, use "."&(COUNTIF($F$2:$F2,$F2)-1) to return the .0, .1, .2 etc. as desired, if there is duplicated ISBN code, return a blank or "".
Let me know if you have any question. Cheers :)

Calculating revenue in excel

Can't calculate the Revenue since the Cell Price contains the 'BDT'.
I find using SUBSTITUTE() to be a pretty clean solution for this. SUBSTITUTE() does a simple find and replace of text in a cell, where applicable. Then VALUE() ensures that the new text is treated as a numeric value rather than a text string.
For example:
=B2*VALUE(SUBSTITUTE(A2,"BDT ",""))
This saves you from having to calculate LENGTH() or spaces in the text with FIND(), etc., so I think it's a little easier to read and implement than other solutions. And it'll work even if "BDT " doesn't appear in the cell, i.e., if there's nothing to replace, then it just... won't replace.
#GPHOfficial's solution will work too, but I find that little less simple to read.
Finally, the "most correct" solution is probably to create a custom currency symbol/format, so you can apply the format in a way that formulas will completely neglect the symbol and only recognize the value.
Try using the formula =RIGHT
I implemented the formula here, the formula should be interchangeable between Excel and Google Sheets
=IFERROR(RIGHT($A7,LEN($A7)-FIND(" ",$A7))*$B7,"")
https://docs.google.com/spreadsheets/d/1PDqQj1y1G56FKzz0Lp86aM-fzso2-IMTZCvZpOoS3go/edit?usp=sharing
(This is based on the assumption that there is a space between the Price and the Currency Code)
Get rid of the BDT.
Use Text to Columns, Delimited, Next, Space, Next, Do not import column (skip), Finish to remove the BDT and leave the prices as true numbers. If you must show the BDT prefix, use a custom number format of \B\D\T General.

Adding additional numerical values into already made column

Major noob here. This is my dilemma:
I created a spreadsheet on excel and input my data in a column. Then I was informed that I need to add two zeros (00) to the front of each value. Is there a way of doing this on excel w/o me double clicking each row and manually adding the 00's before the original value?
in order to add two leading zeros to numbers of unknown length, the only viable option I can think of is to turn the number into a string.
="00"&A1
There may be a way with the format text function to measure the length of your number then format with two leading zeros but that is currently beyond me.
The other option is to go into the custom cell format and change the display to
000000
Where the number of 0s is two longer than the number of digits in your number. If your numbers are inconsistent in length you would need to do this for each cell. It would keep the number as a number though.
Thanks for your replies. #Forward Ed your idea gave me a diff idea. I just added the 00's to the column before and then used another column + the CONCATENATE function.
Also for fellow cavemen like myself, you can use notepad to do it the ghetto way and copy then re-paste back to excel -.-
Im such an idiot lol. Thank you

Using SUMIFS with multiple AND OR conditions

I would like to create a succinct Excel formula that SUMS a column based on a set of AND conditions, plus a set of OR conditions.
My Excel table contains the following data and I used defined names for the columns.
Quote_Value (Worksheet!$A:$A) holds an accounting value.
Days_To_Close (Worksheet!$B:$B) contains a formula that results in a number.
Salesman (Worksheet!$C:$C) contains text and is a name.
Quote_Month (Worksheet!$D:$D) contains a formula (=TEXT(Worksheet!$E:$E,"mmm-yy"))to convert a date/time number from another column into a text based month reference.
I want to SUM Quote_Value if Salesman equals JBloggs and Days_To_Close is equal to or less than 90 and Quote_Month is equal to one of the following (Oct-13, Nov-13, or Dec-13).
At the moment, I've got this to work but it includes a lot of repetition, which I don't think I need.
=SUM(SUMIFS(Quote_Value,Salesman,"=JBloggs",Days_To_Close,"<=90",Quote_Month,"=Oct-13")+SUMIFS(Quote_Value,Salesman,"=JBloggs",Days_To_Close,"<=90",Quote_Month,"=Nov-13")+SUMIFS(Quote_Value,Salesman,"=JBloggs",Days_To_Close,"<=90",Quote_Month,"=Dec-13"))
What I'd like to do is something more like the following but I can't work out the correct syntax:
=SUMIFS(Quote_Value,Salesman,"=JBloggs",Days_To_Close,"<=90",Quote_Month,OR(Quote_Month="Oct-13",Quote_Month="Nov-13",Quote_Month="Dec-13"))
That formula doesn't error, it just returns a 0 value. Yet if I manually examine the data, that's not correct. I even tried using TRIM(Quote_Month) to make sure that spaces hadn't crept into the data but the fact that my extended SUM formula works indicates that the data is OK and that it's a syntax issue. Can anybody steer me in the right direction?
You can use SUMIFS like this
=SUM(SUMIFS(Quote_Value,Salesman,"JBloggs",Days_To_Close,"<=90",Quote_Month,{"Oct-13","Nov-13","Dec-13"}))
The SUMIFS function will return an "array" of 3 values (one total each for "Oct-13", "Nov-13" and "Dec-13"), so you need SUM to sum that array and give you the final result.
Be careful with this syntax, you can only have at most two criteria within the formula with "OR" conditions...and if there are two then in one you must separate the criteria with commas, in the other with semi-colons.
If you need more you might use SUMPRODUCT with MATCH, e.g. in your case
=SUMPRODUCT(Quote_Value,(Salesman="JBloggs")*(Days_To_Close<=90)*ISNUMBER(MATCH(Quote_Month,{"Oct-13","Nov-13","Dec-13"},0)))
In that version you can add any number of "OR" criteria using ISNUMBER/MATCH
You can use DSUM, which will be more flexible. Like if you want to change the name of Salesman or the Quote Month, you need not change the formula, but only some criteria cells. Please see the link below for details...Even the criteria can be formula to copied from other sheets
http://office.microsoft.com/en-us/excel-help/dsum-function-HP010342460.aspx?CTT=1
You might consider referencing the actual date/time in the source column for Quote_Month, then you could transform your OR into a couple of ANDs, something like (assuing the date's in something I've chosen to call Quote_Date)
=SUMIFS(Quote_Value,"<=90",Quote_Date,">="&DATE(2013,11,1),Quote_Date,"<="&DATE(2013,12,31),Salesman,"=JBloggs",Days_To_Close)
(I moved the interesting conditions to the front).
This approach works here because that "OR" condition is actually specifying a date range - it might not work in other cases.
Quote_Month (Worksheet!$D:$D) contains a formula (=TEXT(Worksheet!$E:$E,"mmm-yy"))to convert a date/time number from another column into a text based month reference.
You can use OR by adding + in Sumproduct. See this
=SUMPRODUCT((Quote_Value)*(Salesman="JBloggs")*(Days_To_Close<=90)*((Quote_Month="Cond1")+(Quote_Month="Cond2")+(Quote_Month="Cond3")))
ScreenShot
Speed
SUMPRODUCT is faster than SUM arrays, i.e. having {} arrays in the SUM function. SUMIFS is 30% faster than SUMPRODUCT.
{SUM(SUMIFS({}))} vs SUMPRODUCT(SUMIFS({})) both works fine, but SUMPRODUCT feels a bit easier to write without the CTRL-SHIFT-ENTER to create the {}.
Preference
I personally prefer writing SUMPRODUCT(--(ISNUMBER(MATCH(...)))) over SUMPRODUCT(SUMIFS({})) for multiple criteria.
However, if you have a drop-down menu where you want to select specific characteristics or all, SUMPRODUCT(SUMIFS()), is the only way to go. (as for selecting "all", the value should enter in "<>" + "Whatever word you want as long as it's not part of the specific characteristics".
In order to get the formula to work place the cursor inside the formula and press ctr+shift+enter and then it will work!
With the following, it is easy to link the Cell address...
=SUM(SUMIFS(FAGLL03!$I$4:$I$1048576,FAGLL03!$A$4:$A$1048576,">="&INDIRECT("A"&ROW()),FAGLL03!$A$4:$A$1048576,"<="&INDIRECT("B"&ROW()),FAGLL03!$Q$4:$Q$1048576,E$2))
Can use address / substitute / Column functions as required to use Cell addresses in full DYNAMIC.

Resources