Der Beitrag Case-Sensitive Lookups in Excel: 4 Methods (+XLSX-Download) erschien zuerst auf Professor Excel.
]]>
All following methods will be introduced with the example as shown in the image on the right-hand side. The cell range B4 to B19 contains codes (e.g. “AAA”, “AAa”, and so on) and the cell range C4 to C19 contains numeric values. In cell G3 you can insert a code (e.g. “Aaa”). The goal is to return the numeric value from the cells C4 to C19, depending on the code given in cell G3. For example if the code in G3 is “Aaa” you want to return the value from cell C6, which is 4,626.
The first method is based on the VLOOKUP formula. Unfortunately, the approach is a little bit complex and only works through a workaround. The structure of the case-sensitive VLOOKUP is shown in the image on the right-hand side.
The underlying idea is not to conduct a VLOOKUP with the actual search value, but rather with the row number, in which the search value can be found.
Please note: As for all array formulas please press Ctrl + Shift + Enter on the keyboard after typing the formula.
If you insert the fixed arguments into this formula, you get the simplified structure of the VLOOKUP formula in the image on the right-hand side.
For our example, the case-sensitive VLOOKUP has the following parameters:
Putting these parameters into the formula structure of Figure 93, you get the following formula.
{=VLOOKUP(MAX(EXACT(G3,B4:B19)*(ROW(B4:B19))),CHOOSE({1,2},ROW(B4:B19),C4:C19),2,0)}
A case-sensitive HLOOKUP works very similar to the VLOOKUP. The only difference is that you have to insert 3 TRANSPOSE formulas around and inside the CHOOSE formula. The reason is that CHOOSE can only handle vertical cell ranges in this case.
The structure of the case-sensitive HLOOKUP formula is shown in the image above. As you can see, the formula is getting quite long. This might be a good example for a possible solution in Excel, but not necessarily the best one. The following method number 2 is usually a better option for a case-sensitive, horizontal lookup.
The arguments of the HLOOKUP formula are pretty much the same as in method 1a, the VLOOKUP formula. Applying this to a very similar example leads to the following formula.
{=HLOOKUP(MAX(EXACT(D7,C3:R3)*COLUMN(C3:R3)),TRANSPOSE(CHOOSE({1,2},TRANSPOSE(COLUMN(C3:R3)),TRANSPOSE(C4:R4))),2,FALSE)}
Excel too slow? Speed it up. Get the book now!
Tired of waiting for Excel? Use the 30 best methods described in this book to speed up Excel calculations!
Learn more or get it on Amazon!
The case-sensitive INDEX/MATCH formula is compared to the case-sensitive VLOOKUP formula quite simple. The INDEX/MATCH formula is shorter and in many cases the better option.
The structure of the case-sensitive INDEX/MATCH formula combination is shown in the image on the right-hand side, the following number relate to the image.
Please note (again): As for all array formulas please press Ctrl + Shift + Enter on the keyboard after typing the formula.
The structure shown in Figure 94 can be simplified. After inserting the fixed arguments, the INDEX/MATCH formula looks like in the image on the right-hand side.
Applying this structure on our example, you have the following parameters.
If you now put these parameters into the structure, you get the following formula.
{=INDEX(C4:C11,MATCH(TRUE,EXACT(G3,B4:B11),0))}
The SUMIFS formula doesn’t support an exact lookup. That’s why you could use an alternative formula instead: SUMPRODUCT. Although no “real” array formula (with curly brackets), the SUMPRODUCT formula works like an array formula because it deals with arrays.
The structure of the case-sensitive SUMPRODUCT formula is shown in the image above. The SUMPRODUCT formula multiplies all arguments with each other and sums up the results. If a criterion is not fulfilled, the argument is 0 so the result of the multiplication is 0.
Because this formula is not an array formula, you don’t have to press Ctrl + Shift + Enter when finished typing.
For the example of this chapter, you will get this SUMPRODUCT formula (also shown in the image on the right-hand side.
=SUMPRODUCT(EXACT(G3,B4:B19)*1,C4:C19)
Please note: The SUMPRODUCT approach only works with numeric return values (including dates). If your return value is a text or string, SUMPRODUCT doesn’t work.
Hold on a second. Was this information helpful so far?
If yes: Why don't you subscribe to our monthly, free Excel newsletter? You get all this:
The best Excel tips, tricks and tutorials.
1x per month.
No spam. Promised.
Subscribe now!
Please feel free to download an Excel workbook with all the examples from this article. Just click on this link and the download starts immediately.
Was the information helpful in this article?
Der Beitrag Case-Sensitive Lookups in Excel: 4 Methods (+XLSX-Download) erschien zuerst auf Professor Excel.
]]>Der Beitrag VLOOKUP to the Left in Excel. Yes, It’s Possible! erschien zuerst auf Professor Excel.
]]>
The VLOOKUP formula can be used for returning a value on the left of a search value. But you have to use it in the array form. Because using the VLOOKUP formula as an array formula comes with several disadvantages, please consider two different approaches if your search column is on the right-hand side of the return column.
Like in the previous article—multi-condition lookups—the trick is to create a virtual table (an array) using the CHOOSE formula within the VLOOKUP formula. In this virtual table, you change the structure of the input data so that the search value is located on the left-hand side of the return value.
The structure of the VLOOKUP formula is shown in image on the right-hand side.
As usual for array formulas, press Ctrl + Shift + Enter after you finished typing. The curly brackets are added automatically that way.
Say you have sales data in the cell range B4 to C7 like shown in the screenshot on the right-hand side. The revenue is given in the cell range B4 to B7 and the category in C4 to C7. The task is to return the revenue depending on the selection of the category.
That means you have to following input values:
Assembling all these inputs you will have the following formula for a VLOOKUP to the left.
{=VLOOKUP(G3,CHOOSE({1,2},C4:C7,B4:B7),2,FALSE)}
Again, don’t forget to press Ctrl + Shift + Enter instead of just Enter on the keyboard after you finish to type the formula.
Excel too slow? Speed it up. Get the book now!
Tired of waiting for Excel? Use the 30 best methods described in this book to speed up Excel calculations!
Learn more or get it on Amazon!
Actually, I’ve only added this section for the sake of completeness. In most cases (well, I can’t think of a case you should use the HLOOKUP formula bottom-up) I’d recommend using INDEX/MATCH in a horizontal way instead.
HLOOKUP works top-down. But like the VLOOKUP formula before it can be used to work bottom-up. The structure of the HLOOKUP formula in the array form is very similar to VLOOKUP in the previous section. There is one difference, though: You have to add the TRANSPOSE formula within and around the CHOOSE formula in order to convert the horizontal cell ranges to vertical cell ranges. Again, there are usually easier options for achieving an HLOOKUP from bottom to the top.
The structure of the HLOOKUP formula is shown in the screenshot on the right-hand side. The numbered arguments in this screenshot are the same like in the VLOOKUP formula to the left above.
An example for the bottom-up HLOOKUP is shown in image below. Like before you want to return the revenue from the cell range C3 to F3 based on the selection of the category in cell range C4 to F4.
Assembling the argument in Figure 102 leads to the following formula.
{=HLOOKUP(D7,TRANSPOSE(CHOOSE({1,2},TRANSPOSE(C4:F4),TRANSPOSE(C3:F3))),2,FALSE)}
Hold on a second. Was this information helpful so far?
If yes: Why don't you subscribe to our monthly, free Excel newsletter? You get all this:
The best Excel tips, tricks and tutorials.
1x per month.
No spam. Promised.
Subscribe now!
Please note:
Please feel free to download an Excel workbook with all the examples from this article. Just click this link and the download starts immediately.
Was the information helpful in this article?
Der Beitrag VLOOKUP to the Left in Excel. Yes, It’s Possible! erschien zuerst auf Professor Excel.
]]>Der Beitrag Multi-Condition VLOOKUP and INDEX/MATCH (+Excel-Download) erschien zuerst auf Professor Excel.
]]>The good news: Both major lookup formulas besides SUMIFS (VLOOKUP, and INDEX/MATCH) allow workarounds. The easiest way is usually an additional helper column. But also array formulas can be used for multi-condition lookups – even without helper columns.
In this article, you explore five methods for multi-condition lookups. All methods will be introduced using the same example like shown in the screenshot on the right-hand side.
You have a table containing sales data with the columns “Category” (column C, e.g. “Computers”, “TVs”), “Region” (column D, e.g. “Asia”, “Europe”) as well as the “Year” (column E, e.g. “2016”). The return value (here: “Revenue”) is provided for each combination of category, region and year in column F. The cells J3 to J5 contain selection fields for each of the columns. For example, you want to return the revenues of TVs in Europe in the year 2016. The return value should be shown in the cell J8 to J12, depending on the method in this chapter.
As mentioned before, there is no direct way to conduct a lookup with several conditions using VLOOKUP formula. But there is a simple workaround: Insert a new “primary key” column. To achieve this, concatenate the different search values in a new (leftmost) column.
The first step is to insert the new column B with the new primary key. You can easily concatenate the values from the columns C, D and E by using the “&” sign. The formula in B4 is
=C4&D4&E4.
In the second step, you set up the VLOOKUP formula. The search term is not one single search criteria. Instead, you search for the combination of “Category”, “Region” and “YEAR”. The search range starts now with column B which contains the new primary key. The return value is located in column F so that the column number is 5. As usual the last argument of the VLOOKUP formula is “FALSE” because you search for the exact search phrase. The complete VLOOKUP formula is:
=VLOOKUP(J3&J4&J5,B:F,5,FALSE)
Please note the following comments.
The first method in the previous pages of the multi-condition VLOOKUP required an additional helper column. The method in this section is a little bit more complex but has the advantage that it doesn’t need an additional column.
Because the underlying formula of this method is still VLOOKUP, the arguments are more or less the same. The following numbers correspond to the numbers in the screenshot on the right-hand side, which shows the structure of the VLOOKUP/array formula.
Applying this structure to the example in this chapter you get the following formula.
{=VLOOKUP(J3&J4&J5,CHOOSE({1,2},C4:C51&D4:D51&E4:E51,F4:F51),2,FALSE)}
Please note the following comments:
The third method for a multi-conditional lookup uses the INDEX/MATCH formula and an additional helper column. It pretty similar to method 1 before because the helper column works the same way. Besides that, it’s based on a conventional INDEX/MATCH formula.
The idea of this method is to create a helper column in which you concatenate all search criteria. Unlike the helper column of method 1 (VLOOKUP and helper column), the helper column can be located anywhere on your worksheet. It doesn’t have to be on the left-hand side of the return column.
The formula in the helper column (here: cell B4) is
=C4&D4&E4.
You apply a “normal” INDEX/MATCH formula with the only difference that you search for the combination of criteria within the MATCH part of the formula. The formula (here in cell J10) is
=INDEX(F:F,MATCH(J3&J4&J5,B:B,0)).
Excel too slow? Speed it up. Get the book now!
Tired of waiting for Excel? Use the 30 best methods described in this book to speed up Excel calculations!
Learn more or get it on Amazon!
A helper column always means additional work and in some cases, you want to leave the raw data untouched. The INDEX/MATCH formula combination can also be used without inserting a helper column. Like the method 2 before, the INDEX/MATCH formula is used like an array formula.
The structure of the multi-condition INDEX/MATCH formula is shown in the screenshot on the right-hand side. The following numbers relate to this figure.
Applying this structure to the example of this chapter leads to the following formula.
{=INDEX(F4:F51,MATCH(J3&J4&J5,C4:C51&D4:D51&E4:E51,0))}
Hold on a second. Was this information helpful so far?
If yes: Why don't you subscribe to our monthly, free Excel newsletter? You get all this:
The best Excel tips, tricks and tutorials.
1x per month.
No spam. Promised.
Subscribe now!
If your return value is a numeric value (including a date), you can use a SUMIFS formula without any additional modifications. The structure is described in detail starting in this article.
The example using the SUMIFS formula is shown in screenshot below.
Please note the following comments.
All methods described above work in a horizontally the same way with two exceptions.
All examples are also included horizontally in the download file below.
Please feel free to download an Excel workbook with all the examples from this article. Just click this link and the download starts immediately.
Was the information helpful in this article?
Der Beitrag Multi-Condition VLOOKUP and INDEX/MATCH (+Excel-Download) erschien zuerst auf Professor Excel.
]]>Der Beitrag CHOOSE Formula in Excel: Everything You Should Know erschien zuerst auf Professor Excel.
]]>
The CHOOSE formula returns a value from a list of values. So basically you provide a list of values (or references) and tell Excel, which one of these values to return.
The structure is quite straightforward (see the image above):
The first example is very simple. You got the two data sets as shown in Figure 45. “BMW” costs 15,000 USD and Mercedes 20,000 USD.
In cell E2 you select which value to return, either the first one (price of BMW, 15,000 USD) or the second one (the price of Mercedes, 20,000 USD).
The first argument of the CHOOSE formula selects which value to return. In this case, it refers to cell E2 which says 2. The second part (“B3”) and the third part (“B4”) contain the list to choose from.
So, what will the formula in E3 return after pressing Enter on the keyboard? Correct, it’s 20,000. Why? Because the number 2 in cell E3 determines, that the second item from the list in the CHOOSE formula will be returned. The second item of the list is the cell reference to cell B4 so that the value 20,000 from cell B4 is returned.
After you’ve explored a simple example, you can now take a look at a more advanced one as pictured in Figure 46.
In cell F2 you want to type a year, for example 2017. In the cell below you want to get the sum of the prices of the selected year of the two cars shown on the left-hand side. So if you type 2017 in F2, you want to get the sum of 16,000 USD and 20,500 USD from cells C3 to C4.
That means, you basically need the SUM formula for adding up the values. But instead of providing a fixed range, the cell reference should switch between the two columns B and C.
The first part of the CHOOSE formula determines, which of the following cell references to use. You could simple insert the difference of 2018 and the value in F2. So if you write 2017 into cell F2, 2018 – 2016 is 1 so that CHOOSE returns the first item from the cell reference list. If you type 2016 on the other hand, the formula returns the second cell reference as 2018-2016=2. So you only have to give the correct cell references as the second and third part of the CHOOSE formula. The complete formula is:
=SUM(CHOOSE(2018-F2,C3:C4,B3:B4))
Hold on a second. Was this information helpful so far?
If yes: Why don't you subscribe to our monthly, free Excel newsletter? You get all this:
The best Excel tips, tricks and tutorials.
1x per month.
No spam. Promised.
Subscribe now!
The CHOOSE formula is probably most often used in context with the weekday name. You want to get the name of the weekday from a cell containing a date.
If you want to get the weekday name of the date, given in another cell, please copy and paste this formula. Instead of “A1” within the WEEKDAY formula, just refer to the cell you like.
=CHOOSE(WEEKDAY(A1),"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
Please refer to this article for more information about the weekday name.
Was the information helpful in this article?
Der Beitrag CHOOSE Formula in Excel: Everything You Should Know erschien zuerst auf Professor Excel.
]]>Der Beitrag Combine Text in Excel: 4 Best Ways (+Download) erschien zuerst auf Professor Excel.
]]>
The CONCAT formula has been introduced to Excel with the version 2016. It’s not available on previous versions of Excel. And that’s already the biggest disadvantage. Besides that, this formula is very useful.
The CONCAT ist he sucessor oft he CONCATENATE formula and has at least one and at maximum 254 arguments. It can handle separate cells as well as cell ranges. It’s even possible to combine single cells with cell ranges, e.g.
=CONCAT(B4,C4:D4).
As you can see in the screenshot above, using the CONCAT formula is very easy. Just refer to the cells you’d like to combine.
Unlike the CONCAT formula, CONCATENATE is available in older versions of Excel. Microsoft says within the help section of the CONCATENATE formula, that the CONCATENATE is replaced by CONCAT. CONCATENATE is only kept in Excel in order to guarantee the compatibility to older versions on Excel and it’s recommended to use CONCAT instead.
CONCATENATE works almost the same way like CONCAT with one major difference: It’s not possible to use ranges of cells as references. Only single cells can be combined. The maximum number of arguments and therefore single cell references is 255.
Since Excel 2016 there is another, advanced option to combine text in Excel. The formula is called TEXTJOIN. Besides simply putting text together, the formula offers two advanced options:
The structure of the TEXTJOIN formula is shown in the figure above. The formula has at least three arguments.
The screenshot of the example on the right-hand side shows an example for the TEXTJOIN formula. The first part is skipped which means that there is no delimiter. The second argument is set to FALSE so that blank cells aren’t ignored. Eventually the last argument refers to the cell range B4 to D4 which contains the cells to be combined.
The easiest way is probably to just use the “&”-sign to combine values in Excel. This method has the same disadvantages like the CONCATENATE formula from the method 2 above. It can only regard single cells and not ranges of cells. An advantage of this method is that it’s usually easier to follow up the calculation steps.
As you can see in the screenshot above, you can just refer to several cells and combine them with the &-sign. That’s it.
Hold on a second. Was this information helpful so far?
If yes: Why don't you subscribe to our monthly, free Excel newsletter? You get all this:
The best Excel tips, tricks and tutorials.
1x per month.
No spam. Promised.
Subscribe now!
Let’s say, you want to combine 1,000 Excel cells into one cell. The good news: You can use all four methods to accomplish this, even in a simple manner. There is one restriction though: One Excel cell can’t contain more than 32,768 characters.
For combining 1,000 cells in Excel, you can use two basic approaches:
Use method 1 (CONCAT formula) or method 3 (TEXTJOIN formula) above which can regard cell ranges. The solution using the CONCAT formula is shown in Figure 66. As noted before, the only requirement of this method is that you have to use Excel version 2016.
Insert a helper column (or row, depending on how your data is organized) which always combines the current cell with the previous combination of all cells so far.
As you can see in the image on the right-hand side, the helper column (here in cell G6) combines cells G5 (which contains the previous combination) with the current cell F6. The solution in cell I3 only links to the last row in the helper column.
All the examples above can be found in this example workbook.
Please click here and the download starts immediately.
Was the information helpful in this article?
Der Beitrag Combine Text in Excel: 4 Best Ways (+Download) erschien zuerst auf Professor Excel.
]]>Der Beitrag FIND & SEARCH in Excel: How and When to Use These Formulas erschien zuerst auf Professor Excel.
]]>
The formula returns the number of the character, at which your search term starts. If your text can’t be found, it’ll return a “#VALUE” error.
The structure of the FIND formula is quite simple (the numbers are corresponding to the image on the right-hand side):
If you just want to know, if your text can be found within another cell, you might want to go with the following formula. B2 contains the text or character you search for and B3 is the cell you search in:
=IFERROR(IF(FIND(B2,B3)>0,"Value found",""),"Value not found")
Please note the following comments:
=FIND(1,321)This formula returns 3 because the number 1 is the third character of 321.
Let’s try some examples.
The “default” usage of the FIND formula is to return the number of characters, at which a text first occurs within another text. Let’s say you have the text “Hello there” and want to know, at which position you have an “o”. In such case, you write the following formula (example number 1 in the Excel workbook you can download at the end of this article).
=FIND("o","Hello there")
The return value is 5.
Another example: You want to know the position of “e” after the third character (example number 2 in the example workbook).
=FIND("e","Hello there",3)
The return value is 9.
Now you want to know the position of the second occurrence of “e” in “Hello there”.
=FIND("e";"Hello there";FIND("e";"Hello there")+1)
This formula works as follows. The second FIND formula returns the position of the first occurrence of “e” in “Hello there” which is 2. This is used as the START NUMBER (+ 1 because you want to start counting after the first “e”) for the first FIND formula.
Finding the last occurrence of a string within a text is a little bit more complicated. You use SUBSTITUTE and LEN. The complete formula is like this:
=FIND("tempreplacetext";SUBSTITUTE("Hello there";"e";"tempreplacetext";SUM(LEN("Hello there")-LEN(SUBSTITUTE("Hello there";"e";"")))/LEN("e")))
In order to understand the formula better, let’s start in the middle with the part
SUM(LEN("Hello there")-LEN(SUBSTITUTE("Hello there";"e";"")))/LEN("e")))
This part of the formula determines the number of “e” in “Hello there”. It replaces “e” in “Hello there” and the difference in the two versions (with and without e – “Hello there” and “Hllo thr”) is the number of “e”s.
The whole part
SUBSTITUTE("Hello there";"e";"tempreplacetext";SUM(LEN("Hello there")-LEN(SUBSTITUTE("Hello there";"e";"")))/LEN("e")))replaces the last “e” by “tempreplacetext”. Now you just put this into the FIND formula and get the position of “tempreplacetext”.
If you want to use this formula, replace all “e”s by your cell reference for the SEARCH TEXT and all “Hello there” by the cell reference to your WITHIN TEXT.
Excel too slow? Speed it up. Get the book now!
Tired of waiting for Excel? Use the 30 best methods described in this book to speed up Excel calculations!
Learn more or get it on Amazon!
A last example for the FIND formula: You want to know what is written between two brackets. In such case, you can also use the FIND formulas in combination with the MID formula.
=MID("Hello (you) there",FIND("(","Hello (you) there")+1,FIND(")","Hello (you) there")-FIND("(","Hello (you) there")-1)
The MID formula returns some part of text from a (longer) text. It has three arguments:
In our example above, the first FIND formula provides the character you want to start at. In our case that’s the first opening bracket (+1 because you want to start one character later). The second and third FIND formulas determine the length by
Like the FIND formula in Excel, SEARCH also returns the position of a text within another text.
The SEARCH formula is very similar to the FIND formula. It has exactly the same arguments and works the same way.
Because of the, the structure is as follows:
Yes, you are right – these arguments are exactly the same like in the FIND formula. But there is a major difference: SEARCH does not regard lower and upper case: It is not case sensitive. FIND on the other hand is case-sensitive and regards upper and lower cases.
The examples work exactly the same way like for the FIND formula. You only have to replace “FIND” by “SEARCH”. Because of that, we just show the summary below. If you want to know more, either scroll up to the “FIND”-examples or download the example workbook below.
Example no. | Description | Formula |
6 | Return the position of “o” in “Hello there”. | =SEARCH(“o”,”Hello there”) |
7 | Return the position of “e” in “Hello there” after the third character. | =SEARCH(“e”,”Hello there”,3) |
8 | Return the position of the second occurrence of “e” in “Hello there”. | =SEARCH(“e”,”Hello there”,SEARCH(“e”,”Hello there”)+1) |
9 | Return the position of the last occurrence of “e” in “Hello there”. | =SEARCH(“tempreplacetext”,SUBSTITUTE(“Hello there”,”e”,”tempreplacetext”,SUM(LEN(“Hello there”)-LEN(SUBSTITUTE(“Hello there”,”e”,””)))/LEN(“e”))) |
10 | Return the text within brackets of “Hello (you) there”. | =MID(“Hello (you) there”,SEARCH(“(“,”Hello (you) there”)+1,SEARCH(“)”,”Hello (you) there”)-SEARCH(“(“,”Hello (you) there”)-1) |
The error message “#VALUE!” comes up most often for the FIND and SEARCH formulas. If you receive a “#VALUE!” error, please check the following possibilities.
The first and major difference between FIND and SEARCH:
FIND is case-sensitive. SEARCH is not case-sensitive.
That means, FIND regards capital and small letter whereas SEARCH doesn’t.
How to remember which is which? I use the mnemonic:
I admit, it’s not the best mnemonic. Please let me know, if you have a better one!
There is also a second difference between FIND and SEARCH: You can use SEARCH with wildcard criteria within the SEARCH TERM.
=SEARCH("?b","abc")
=SEARCH("*b","abc")
=SEARCH("~*","ab*c")
Hold on a second. Was this information helpful so far?
If yes: Why don't you subscribe to our monthly, free Excel newsletter? You get all this:
The best Excel tips, tricks and tutorials.
1x per month.
No spam. Promised.
Subscribe now!
Maybe you have noticed that there is also a slightly different version of the two formulas in Excel. If you add a “B” to the formulas, you can still use them the same way. So what is the difference?
FINDB and SEARCHB provide support for more complex languages. The definition by Microsoft is:
SEARCHB counts 2 bytes per character only when a DBCS language is set as the default language. Otherwise SEARCHB behaves the same as SEARCH, counting 1 byte per character.
According to Wikipedia DBCS stands mainly for the Asian languages Chinese, Japanese and Korean.
Please feel free to download all the examples shown above in this Excel file.
Click here and the download starts immediately.
Was the information helpful in this article?
Der Beitrag FIND & SEARCH in Excel: How and When to Use These Formulas erschien zuerst auf Professor Excel.
]]>Der Beitrag How to Replace Text with the SUBSTITUTE Formula in Excel erschien zuerst auf Professor Excel.
]]>
The SUBSTITUTE formula replaces parts of text. It searches for some text (“string”) within another text and once found replaces it.
The SUBSTITUTE formula has 4 parts:
Let’s use this knowledge and take a look at some examples.
Say you have the text “This cell contains text” in cell B3. You want to search for the text given in cell C3 (“text”) and replace it by the text in cell D4 (“some text”). So, you add the word “some” in front of text.
The complete formula looks like this:
=SUBSTITUTE(B3,C3,D3)
Hold on a second. Was this information helpful so far?
If yes: Why don't you subscribe to our monthly, free Excel newsletter? You get all this:
The best Excel tips, tricks and tutorials.
1x per month.
No spam. Promised.
Subscribe now!
In a second example, you want to replace only the last occurrence of some text. Again, you can use the SUBSTITUTE formula. But instead of leaving the last argument blank, you must specify that you want to replace the last instance. Therefore, you count the number of instances. This can be done with a trick, also using the SUBSTITUTE formula.
The first three arguments are like the previous example:
(LEN(B4)-LEN(SUBSTITUTE(B4,C4,"")))/LEN(C4)
Now you can combine it to the complete formula:
=SUBSTITUTE(B4,C4,D4,(LEN(B4)-LEN(SUBSTITUTE(B4,C4,"")))/LEN(C4))
The difference to the REPLACE formula: The REPLACE formula solves a similar purpose like the SUBSTITUTE formula. But instead of letting Excel search for a certain string, you must provide the start number of characters you want to replace as well as the total number of character to be replaced.
Der Beitrag How to Replace Text with the SUBSTITUTE Formula in Excel erschien zuerst auf Professor Excel.
]]>Der Beitrag Status Bar Shows a Wrong Result (Sum, Average) – Here Is Why erschien zuerst auf Professor Excel.
]]>
No doubt, the status bar is very helpful. Since the Excel version 2003, you can display more than one type of information. For example, the sum, the average, maximum and so on at the same time.
Customizing the information in the status bar is very easy. Follow these steps:
Let’s take a look at an example. You have a simple Excel table with 3 rows. When summing up the values of item 1, item 2 and item 3 the result should be 6. This is shown in the screenshot on the right-hand side.
Sometimes, Excel doesn’t show the correct result. There are 3 possible reasons.
First of all: you are right. You didn’t make a mistake. But Excel isn’t wrong either. Well, it handles the status bar information in a strange and rather inconsequential way.
When summing up rows, hidden rows in-between are disregarded (see the upper screenshot on the right-hand side).
On the other hand, when summing up columns, the shown result regards hidden and grouped columns. This is shown in the lower of the 2 screenshots on the right-hand side.
So how to disregard hidden and grouped columns? Select only visible cells. Follow these steps:
Now, the correct result of all visible cells should be shown.
Hold on a second. Was this information helpful so far?
If yes: Why don't you subscribe to our monthly, free Excel newsletter? You get all this:
The best Excel tips, tricks and tutorials.
1x per month.
No spam. Promised.
Subscribe now!
It’s also possible that some cells aren’t formatted as numbers but rather as text. In such case the information in the status bar will show wrong results as well.
Please take a look at the image on the right-hand side. The sum of the 3 cells C3, C4 and C5 should be 6. Instead, Excel shows 4. The reason is that cell C4 is formatted as text instead of a number.
How to handle this? Force all numbers to text. In this simple example it’s easy: Format the cell C4 as number, enter it one time and press Enter on the keyboard.
If you have many cells, please refer to this article for more information of how to force cells to the number format.
When you select the range of cells, does Excel show a sum? Or just “Count” and “Numerical Count”? In such case, please check if there are error messages in any of your cells.
So what to do now? You have got several options:
Der Beitrag Status Bar Shows a Wrong Result (Sum, Average) – Here Is Why erschien zuerst auf Professor Excel.
]]>Der Beitrag Currency Conversion in Excel: Tutorial + Free Excel Add-In erschien zuerst auf Professor Excel.
]]>
Let’s start with the possible sources. There are many sources for exchange rates online and the all offer them in a more or less convenient way. Here are some selected sources.
Actually there are two approaches with Google. The first one is just to use the standard Google search. Just type “USD to EUR” and you’ll receive the exchange rate.
The second option has the advantage, that Google provides a very compact tool which you could use for some VBA automation. The link is quite straight-forward: https://www.google.com/finance/converter?a=1&from=USD&to=EUR. For converting other currencies than USD to EUR, just replace the respective symbols within the link. That’s it. You can furthermore define the amount by changing a=1 within the link: If you want to convert 2 USD to EUR, just say a=2 so that the complete link would be https://www.google.com/finance/converter?a=2&from=USD&to=EUR.
Similar to Google Finance, Yahoo!Finance also offers exchange rates. You can find them here:
https://finance.yahoo.com/quote/USDEUR%3DX
In this link, you can simply replace the USD and EUR symbols by other currencies. If you for example want to convert GBP to AUD, then the link would be
https://finance.yahoo.com/quote/GBPAUD%3DX
If you search for an exchange rate on a specific day, you could use oanda.com. The complete link is https://www.oanda.com/currency/converter/ and you can simple type your currencies and set the day (up to 180 days back).
Unfortunately, you can’t download time series of exchange rates for free. You’d need a Pro Account (75 USD per month). So if you just quickly need to look up an exchange rate within the last 180 days, this is a convenient tool. Otherwise you should rather use one of the other sources (below).
Hold on a second. Was this information helpful so far?
If yes: Why don't you subscribe to our monthly, free Excel newsletter? You get all this:
The best Excel tips, tricks and tutorials.
1x per month.
No spam. Promised.
Subscribe now!
If you are looking for a free and comprehensive database, maybe one of the large banks is best for you. The European Central Bank offers daily exchange rates, always updated at 4 pm (CET). You can download the last 18 years as a CSV file.
Please note the following comments:
Similar to the ECB, the Federal Reserve Bank provides long time series of exchange rates. The format is not as handy as the CSV download of the ECB though.
The link: https://www.federalreserve.gov/releases/h10/hist/. You have to select your desired currency here first and get a long website for each currency.
Once you’ve found the exchange rates you need, there are some useful tips & tricks of how to integrate them into your Excel workbook. First you have to decide, if you want to use a fixed rate for all conversions or if you rather want to use daily rates.
Fixed rates – that means you use the same rate for each currency conversion independent of the date – have one big advantage: They are much easier to integrate into your Excel sheet. Just find one rate (usually from either Google Finance, Yahoo!Finance or Oanda.com as shown above) and integrate it into your workbook.
Please note the following advice: It’s recommended to set up one worksheet containing the basic assumptions. In this case, you’d have a worksheet containing all exchange rates. Whenever you use an exchange rate, link to the respective cell.
Also, try to name the cells, for example “ExchangeRateUSDEUR”. Now you can easily integrate the exchange rate into your formula:
=A1*ExchangeRateUSDEUR
If you want to use daily exchange rates, you have to work a little bit harder. Recommendation: Download the exchange rates from the ECB. Open the CSV file by double-clicking on it and copy the sheet into your Excel workbook. Now use the 2-dimensional lookup INDEX/MATCH/MATCH for lookup up the exchange rate you need.
As you can see on the screenshot, the formula is quite long. Because all the exchange rates given in the CSV file are converting to EUR, you need to look up two exchange rates and divide them by each other.
Please feel free to download the example workbook here.
Excel too slow? Speed it up. Get the book now!
Tired of waiting for Excel? Use the 30 best methods described in this book to speed up Excel calculations!
Learn more or get it on Amazon!
We have a gift for you. Completely free! Our Excel add-in “Professor Excel Currency Converter”. Get up-to-date exchange rates directly into your Excel workbook. Once installed, you will see a new section on the right-hand side of the “Home” ribbon of Excel.
For installing the add-in, download the setup file below, click on it and follow the instructions.
Once installed, you can simply use it by typing these two formulas:
The first formula, “=PROFEXCurrentExchangeRate(“USD”,”EUR”)” has two arguments: The currency from and the currency to. Quite simple, isn’t it?
Please note: The current exchange rates are only updated when you press the “Update Data” button. (The reason is, that – if you use it multiple times – your Excel might freeze if the exchange rates are updated permanently.)
The second formula =PROFEXExchangeRate(“USD”,”EUR”,TODAY()-3) has a three arguments:
Very easy, isn’t it? You can further define within the settings, what happens if an exchange rate is not available (e.g. for weekends, public holidays):
AUD | CNY | EEK | HUF | ISK | LVL | NOK | ROL | SGD | TRL |
BGN | CYP | GBP | IDR | JPY | MTL | NZD | RON | SIT | TRY |
BRL | CZK | HKD | ILS | KRW | MXN | PHP | RUB | SKK | USD |
CAD | DKK | HRK | INR | LTL | MYR | PLN | SEK | THB | ZAR |
CHF |
Der Beitrag Currency Conversion in Excel: Tutorial + Free Excel Add-In erschien zuerst auf Professor Excel.
]]>Der Beitrag Bullet Points in Excel: 6 Easy Methods (+Download) erschien zuerst auf Professor Excel.
]]>
Like said in the introduction, there is no very smooth way to create bullet point lists in Excel. Either the methods require several steps or the result just doesn’t look very nice. In this article, you learn 6 methods of inserting bullets in Excel – either directly into the Excel cell or to a text box. In the summary section of this article, you can download all 6 methods in a comprehensive Excel workbook.
The first method is usually also the fastest: Insert the bullet symbol with a keyboard shortcut. In order to achieve this, enter a cell (for example by pressing F2 on the keyboard) and press Alt + 7 on the number pad.
Please note:
The second method is quite similar to our first method above. But instead of using a keyboard shortcut, you manually insert the bullet character.
Please note:
Hold on a second. Was this information helpful so far?
If yes: Why don't you subscribe to our monthly, free Excel newsletter? You get all this:
The best Excel tips, tricks and tutorials.
1x per month.
No spam. Promised.
Subscribe now!
This method is again very similar to methods 1 and 2 above. Instead of inserting bullet character with a keyboard shortcut or from the “Symbol” menu, you could just copy and paste it from there. Please feel free to copy any of the characters below.
• ● ◦ ▪ □ ♥ ─ − → ►
If you don’t want to insert the bullet character for every cell again you could just define a custom number format which adds the bullet character automatically.
• @into the field for “Type”.
Please note:
The fifth method for inserting bullet points usually looks most tidy. The idea is to insert an additional column containing the bullets. Please take a look at the example on the right-hand side.
Please note:
Excel too slow? Speed it up. Get the book now!
Tired of waiting for Excel? Use the 30 best methods described in this book to speed up Excel calculations!
Learn more or get it on Amazon!
If you don’t want to add bullet points inside an Excel cell but to a text box in Excel instead, you can use the built-in function.
That’s it. Now you can start typing your text.
In this article, you learn how to insert bullets to text cells and text boxes in Excel. The first 4 methods introduced above insert the bullet symbol into your Excel cell. Method 5 uses an additional column which has the advantage, the multi-line cells have a nice line break. The sixth method deals with bullets in text boxes.
Method 1 | Method 2 | Method 3 | Method 4 | Method 5 | Method 6 | |
Name | Alt + 7, Alt + 9 or Alt + 0149 | Insert the bullet symbol from “Symbols” | Copy and paste the bullet character (from here) | Use a custom number format | Add an additional column | Bullet points in text boxes and charts |
Description | Insert the bullet symbol | Insert the bullet symbol | Insert the bullet symbol | Insert the bullet symbol | Use a helper column for the bullet symbol | Insert a text box and right click into it. Then click on “Bullets” |
Works on multi-line cells | No | No | No | No | Yes | Yes |
Please feel free to download the example workbook here. It contains 6 detail worksheets (for each method one worksheet) plus the summary table.
Was this page useful for you?
Der Beitrag Bullet Points in Excel: 6 Easy Methods (+Download) erschien zuerst auf Professor Excel.
]]>