Can I nest the IF or any other function inside of the FILTER function to return maybe 1 instead of GBP in column J and return LON instead of LONDON in column B?
Can I nest the IF function inside of the Filter Function?
481 views Asked by Ilyas Esa At
1
There are 1 answers
Related Questions in EXCEL
- Power Query / M Code, extract a list of tables into one main table, some column headers same but some different and in different order (and in row 2)
- Is there a way to validate the cell format (from excel) to fetch the symbol from it (in Java)?
- Excel - Visual Basic, macro with autofill "1"
- Getting Run-time error '13': Type Mismatch using .Find
- Getting website metadata (Excel VBA/Python)
- Excel Code Editor doesn't work (blank window)
- How to find out how many of each 2, 3 and 4 required to fit in 100 using excel?
- How would I apply a rather complex summation formula like this in Excel?
- Removing a Button from Customized Excel Ribbon
- Excel - Update Item Description Based on Accessories Ordered with It
- select duplicates from data based on another column
- How to use VBA to bold just some text
- VBA Code to filter and get values from csv to excel worksheet
- Look up max alpha numeric value
- Azure Batch for Excel VBA
Related Questions in IF-STATEMENT
- Basic Python Question: Shortening If Statements
- Why if condition work but else if condition doesn't work?
- How to list several items in the dialog box for execution?
- "if contains" with forbidden special characters
- bash if equals some file
- change binary data like "111 into 001" in python by using if else or using regex
- How much of a bonus do I get if I sell a specific number
- Conditional Concatenation for Exchange Contact Imports
- How can i correct a multiple choice question with multiple correct answers?
- IF AND OR Nested ArrayFormula not working - What am I missing?
- I can search one sheet, but can't manage to string two searches with the IFS function
- How to add 1 (or more generally, perform a simple operation) on a column based on a condition
- Playwright checking the text of a locator and replacing values
- Read a variable and printing it on a monitor - Arduino
- Comparison between two strings is not working
Related Questions in EXCEL-FORMULA
- How would I apply a rather complex summation formula like this in Excel?
- Excel - Update Item Description Based on Accessories Ordered with It
- select duplicates from data based on another column
- Look up max alpha numeric value
- Assistance with sum for multiple separate rows using multiple criteria please
- Excel Index+ match Returns duplicate value
- requesting excel formula to compare columns but going in order and skipping blanks
- Concatenate and dropping leading zeros
- Math's & Excel formula to calculate the interest rate from the EMI and principal amount?
- Excel - How get everything to the left of the second to last instance of a character
- Calendar is not Highlighting Accurate Time
- How to search for size in the list and set costing based on it?
- Is there a way to set a cells value based on the value this cell held at a certain time, even when the cell value changes over time?
- How to sum monthly data in Excel into quarterly
- Can I use Sumproduct arrays and check two separate criteria counting TRUE statements?
Related Questions in FILTERFUNCTION
- Can I nest the IF function inside of the Filter Function?
- WPS Spreadsheet FILTER function only show 1 result row
- EXCEL - Error with Filter/Index Match/Xlookup/Vlookup - partial results
- Can I add columns to filtered data without it all being mismatched when the original data is reorganized?
- How do I output the row containing the lowest value from a specific column inside a filtered dynamic array?
- about filter in R
- how to print the letter if it exists in the list using lambda,filter function
- Use filter to return the words from a list of words which start with a target letter
- DAX Multiple filters across multiple columns to produce new table
- Filter function for wordpress seo title
- Best way to handle copy down of formulas adjacent to filter arrays in excel
- How i can use filter function in python?
- Libroffice Calc - macro to iterate filter in 2 loops?
- Excel Filter Function to condense multiple horizontal filters into 1 vertical filter
- Spring Boot Admin application - use of InstanceExchangeFilterFunction to convert snake_case to camel case for UI
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
As per our discussion in the comments above, it would be more efficient to manipulate the results of the
FILTER()function by nesting it inside of another function, rather than attempting to manipulate the entire data set. One such function that would work in this situation is theSWITCH()function:SWITCH()looks at each value in the filtered array and replaces any matching values found with their corresponding results. Matching values and results are entered in pairs and can include up to 126 pairs in total. The final optional argument is the default value to be returned if no match is found, which in this case is the original value present in the filtered array. Also,SWITCH()only performs an exact match, so you can't use wildcards or comparison operators.The above-mentioned formula is the quick and easy method, which works with the sample data you provided; however, it could be prone to errors if "GBP" and/or "LONDON" are present in more than one column. Furthermore, if you're actual data set contains multiple city names in the "Address" column (ie: Birmingham, Glasgow, Liverpool, etc.), managing the list of values and their corresponding results within
SWITCH()can become quite cumbersome. As such, it would be more appropriate to identify the specific columns in the filtered array that you wish to manipulate and perform the applicable action on each individual column:In this example,
INDEX()was used to identify the entire "Address" column by omitting the row_num argument and setting the column_num to 2, andLEFT()was used to simply return the first 3 letters of each value. The "Currency" column was identified in the same manner with column_num 4, andSWITCH()was used to replace the currency codes with a numeric value. This method works fine if your data set only contains a limited number of currency codes. I didn't specify the final default value argument in this case, soSWITCH()will return#N/Aif a new code is present (ie: "CAD"), and you'll know the formula needs to be updated with an additional pair of values and results.HSTACK()is then used to create a new array consisting of the filtered array, plus the new "add" and "cur" columns (7 columns in total), andCHOOSECOLS()is used to replace the original column 2 with the new column 6, as well as 4 with 7. That's it!On a side note, I'm not a fan of using entire column references like
A:E,A:AandE:Eas this will significantly reduce the overall performance of the workbook (you'll likely notice a lag or hesitation when inputting new values in the referenced columns). Structured tables are ideal because the column references are dynamic and expand automatically when new records are added. However, if you prefer standard range references, I highly recommend using a reasonable number of rows that extends far enough below your existing data to allow for growth. For example: if your dealing with only a few hundred rows of data,A2:E1000,A2:A1000andE2:E1000would be adequate, and it's far more efficient thanA1:E1048576(which is whatA:Eis referencing).Cheers!