I wondered if there was a way of making the following formula less memory intensive. I am currently using a SUMIF with a contains criteria to see if a substring is contained in another cell. Performing this over a large amount of data, using the wildcard approach I have opted for, is causing the sheet to become incredibly slow.
I wondered if there was a more optimal solution to the following part that I have put in bold? (Or the rest of the formula too!).
Additionally, can this be put into an array formula with the rows and columns in B:B and 1:1 the constraints?
=SUMIFS('Sheet1'!$R$2:$R,'Sheet1'!$D$2:$D,"<="&$A3,'Sheet1'!$E$2:$E,">="&$A3, 'Sheet1'!$C$2:$C, RIGHT(B$2,len(B$2)-FIND("_", B$2)), 'Sheet1'!$O$2:$O, **"*"&LEFT(B$2,FIND("_", B$2)-1)&"*"**)
Related
At my job, we have several rental properties that we manage. Each one of these properties may go by different names. For example a property may be called Amber Gateway, Platinum Gateway, The Gateway, etc. We have maybe 500-600 Excel workbooks floating around with different types of information in them & I might be asked to pull information from various ones.
The lack of a consistent naming methodology prevents me from using a standard Index/Match function to look up data. I'm not sure if this is the best solution, but this has been my stab at solving the problem.
I've created a worksheet that has a list of all the property names in Column A. Any associated names are listed to the right on the same row in Column B, Column C, and so on. Just for simplicity, say there are only 5 properties and all my data is in A1:E5. Then say the property I'm interested in is in F1 and the property list I want to "match" it up against is in G1:G5. So my data would look something like this:
River Stream Creek Brook Rivulet
Apple Fruit
Rock Boulder Stone Slab
Candy Dessert Sweets
Forest Trees
Given the word 'boulder' and the following list:
Candy
Fruit
Creek
Slab
Forest
my goal is to return the list position of the synonym 'slab' - in this case, 4.
I think I can use the below array formula in place of the Match function. to accomplish this:
{=SUMPRODUCT(--(INDEX(A1:E5,SUMPRODUCT(--(A1:E5=F1)*ROW(A1:E5)),)
=G1:G5)*IF(G1:G5<>"",MATCH(G1:G5,G1:G5,0)))}
Now this formula is a bit unwieldy and I was hoping to translate it into a UDF to make it easier to work with. I'm unfamiliar with VBA though, and after doing a bit of searching, I realized that VBA logic works quite differently than Excel Formula logic. Specifically, I don't think I can use = to force my lookup grid into TRUE/FALSE values in VBA like I do in the SUMPRODUCT functions. Do I have to learn VBA in order to implement this as a UDF or is there another solution? In practice, my lookup grid (A1:E5) will be in an external workbook.
If my attempt is completely off the mark, I'm open to other solutions. I know the Match formula function supports wildcards, but it wouldn't work in the case of dramatically different names, so I was hoping for something more comprehensive.
This is my first time asking a question on here, so please let me know if this belongs in a different area or there's any matter of etiquette I'm overlooking.
I am working on huge excel sheets from different sources about the same thing. The way the sources report it and write down information is different. So, for example, one would write the location as "Khurais" whereas the other would write it as "Khorais".
Since both of these files are contain important information, I would like to combine them in one excel sheet so that I can deal with them more easily. So if you have any suggestion or tool that you think would be beneficial, please share it here.
P.s. The words in the excel sheet are translations of Arabic words.
You could use Levenshtein distance to determine if two words are "close" to each other. Based on that you could match.
You could use FuzzyLookup, a macro that allows you to do appropriate matching. It worked really well for me in the past and is actually really well documented.
You can find it here: https://www.mrexcel.com/forum/excel-questions/195635-fuzzy-matching-new-version-plus-explanation.html including examples on how to use it.
Hope that helps!
PS obviously you can also use it stricly within VBA (not using worksheet functions)
The Double Metaphone algorithm springs to mind. It attempts to convert strings into phonetic representations. For example, "Folly" and "Pholee" should have the same phonetic code.
If you could generate these codes, you could then match your records based on them, instead of the strings.
Here's an article that explains, along with sample VBA code:
https://bytes.com/topic/access/insights/965241-fuzzy-string-matching-double-metaphone-algorithm
Hope that inspires you :)
So I feel like this is a pretty simple question, but I cannot for the life of my find the answer, here or elsewhere.
I'm trying to autopopulate a column with custom text. I suppose it would be the row adjacent.
Thought vlookup was the solution, but I'm rusty.
Basically it's financial, if the Description contains, say, "Amazon" or "Subway" I'd like to populate the adjacent cell with "Amazon" or "Online Shopping" or "Subway" or Fast food.
I'm using numbers but assume that excel advice would apply for such a simple (seemingly) task.
Make sense?
Also, hope I formatted the image correctly.
Ok thanks!
Just looking at the sample data I can see a pattern that emerges from these transactions. However, My first thought would be to jump to VBA for Excel but I don't believe that is available for Mac OS.
Vlookup will only work with the Range_Lookup set to TRUE which means it will try to find the closest match. This might lead to incorrect matches returned or problems with the requirement for sorting your table array that is being queried.
The only other thing that came to mind which would work for a single query value such as "Amazon" OR "Subway" would be to use a nested formula that checks if that substring is found in the Description column for each cell. This would be something like:
=IF(FIND("Amazon",D1)>0,"Amazon","")
The problem with this is that it only checks for one value and it does not have an error handling mechanism so each string that is checked without the word "Amazon" in it will return a #Value error in Excel.
I am trying to run an IF statement in Google Spreadsheet that will, if "Yes" SUM a series of values.
=IF(G3="Yes",=SUM(C3*D3)+(E3*D3))
This works (if I ignore the IF) and just do =SUM(C3*D3)+(E3*D3), so I know my math is correct.
I have read a few different posts that are asking similar questions, but many have "guesses" and are offering different structured formulas, so I'm not really even sure what the proper structure is any more.
Basically, for the nerdy portion of you, the spreadsheet does the following:
If the "killed" column is Yes, I need to calculate the XP of the monsters killed.
Base XP (C3) times Qty (D3), plus Bonus XP (E3) times Qty (D3) and them SUM the value.
The equal sign (=) in front of SUM should not be there. If your formula works I guess Google Docs just ignores it. Also, the function SUM() is useful to add the values from a range of cells from the same row or column when you don't know in advance how many cells you will add (or there are more than 2 cells and you use SUM() because it's less to write).
If I understood your request, the formula you need is:
=IF(G3="Yes",C3*D3+E3*D3)
Right now the SUM function is only wrapping C3*D3 then you are adding (E3*D3). This is the same as (C3*D3)+(E3*D3) not using the SUM function. Order of operations tells us there is no need for the parentheses so you could write C3*D3+E3*D3.
The IF function has the following parameters:
IF(EVALUATION,IF TRUE,IF FALSE)
So your final equation would be:
=IF(G3="YES",C3*D3+E3*D3,"")
I always add the FALSE return to be blank so that if I need to change it later I can do so.
What is the best way to execute a single value MDX query in Excel cell?
VBA is fine also.
I guess, best way is clear and understandable query syntax. Here is an example.
It is unlikely event, that you just need 1 value. But if that is the case, then any well readable query, that returns the result, will do - you just need to do it once, so why would you care :P
If in fact you need to do whole column, then even how you inserting them in VBA makes quite a big impact. This is because every cell is an object, and it takes time to refer to that object properties.