formulas and functions
25261 TopicsPower Query - How Do I Count a Number of Entries Based on Another Column?
Hello! The title might be a little confusing. Here's the situation. I manage uniforms for my team. I am making a SharePoint list and form that an employee will use to request the uniforms. Then, to give me a digestible table that shows me exactly what I need, I have an Excel Power Query pulling the list in. On the form, instead of having a different entry for each polo in each color, each size, and each cut, I have it separated so that you pick cut, sizing, and color separately. Is there a way to have Power Query pull it to show me, for the screenshot example: Female L Red Polo: 2 Female L Blue Polo: 2 Male M Red Polo: 3 Male M Blue Polo: 1 Male M Tan Polo: 2 So on, and so forth. Is this possible? Thank you!165Views0likes3CommentsFormula help
Hi all, I have a spreadsheet with four sheets of data (different suppliers, then organised by catalogue/non-catalogue products), and I want the product name to pull through to a fifth summary sheet if the number of items required is >0. So; I want the highlighted info from sheets 1-4 to pull through to sheet 5 (product name and number required) if the number required is >0 Hopefully that makes sense - can anyone tell me how to do this?120Views0likes5CommentsStacked Excel Formula
Hello everyone. I've spent the past 2-3 hours trying to figure this out on my own without luck. What I'm needing is a formula that will check D11 (highlighted) to make sure that it's within the parameters listed below it (<17), then I need it to do the same for H11 and I11 (highlighted) and enter the number (1-3) that are not "equal to or greater/less than" into K11. K11 reflects how many samples in Row 11 that are outside of those parameters. I'm trying to make this worksheet more automated and this is the one thing that I cant figure out. Example 1: (all numbers are within parameters, so a 0 is entered into column K) Example 2: (column G is not within the parameters, therefor there is 1 entry in column K)124Views0likes2CommentsWrapRows2Dλ / WrapCols2Dλ: Fast, efficient 2D wrapping without flattening
Background One of Excel's biggest weaknesses is in working with 2D arrays as objects that can be re-shaped. WRAPROWS/WRAPCOLS do not accept 2D arrays (#VALUE!) and are strictly for shaping 1D arrays. The usual workarounds involve flattening with TOROW/TOCOL then re-shaping with WRAPROWS/WRAPCOLS, REDUCE used as an iterator to stack (do-able but slow), and even MAKEARRAY (do-able, but not instinctive and slow). The Goal Fast, efficient 2D wrapping without flattening. The Approach Pure deferred i/j indexing with modular math and sequencing. The function and sample workbook is provided below. I welcome any and all feedback: suggestions for improvement, your approach to 2D shaping, etc. // Fast, efficient 2D wrapping without flattening //----------------------------------------------------------------------------------- //---WrapCols2Dλ--- //----------------------------------------------------------------------------------- //Author: Patrick H. //Date: 1/28/2026 //Version: 1.0 // //Description: //Wrap a 2D array into column blocks of a specified width while preserving row height. //The wrapped blocks are stacked vertically in the output. //Jagged or uneven final blocks are padded with NA() by default, unless a fill value //is supplied via the optional pad_with parameter. // //----------------------------------------------------------------------------------- //Parameter Description //array - 2D array to be wrapped (1D arrays not supported) //new_width - Number of columns in each wrapped block // //Optional Description //pad_with - Fill value used to pad incomplete blocks. If omitted, NA() is used. // //Lambda called: Echoλ WrapCols2Dλ= LAMBDA( array, new_width, [pad_with], //Check inputs LET( //Shape h, ROWS(array), w, COLUMNS(array), blocks, CEILING(w/new_width,1), //Optional pad_with, IF(ISOMITTED(pad_with),NA(),pad_with), //Total rows when wrapped r, blocks * h, //Scenarios Is1D?, OR(h = 1,w = 1), IsScalar?, AND(h = 1, w = 1), InvalidDim?,new_width >= w, SpillRisk?, r > 1048576, //Logic gate IF(IsScalar?,#VALUE!, IF(Is1D?,#VALUE!, IF(InvalidDim?,"#WIDTH!", IF(SpillRisk?,#NUM!, //Proceed LET( //Indices - deferred modulo, LAMBDA(MOD(SEQUENCE(r),h)), i, LAMBDA(IF(modulo() = 0, h, modulo()) * SEQUENCE(,new_width,1,0)), j, LAMBDA(Echoλ(SEQUENCE(r / h,,1,new_width),h) + SEQUENCE(,new_width,0,1)), //Wrapped array result, IFERROR(INDEX(array,i(),j()),pad_with), result ))))))); //----------------------------------------------------------------------------------- //---WrapRows2Dλ--- //----------------------------------------------------------------------------------- //Author: Patrick H. //Date: 1/28/2026 //Version: 1.0 // //Description: //Wrap a 2D array into row blocks of a specified height while preserving column width. //The wrapped blocks are stacked horizontally in the output. //Jagged or uneven final blocks are padded with NA() by default, unless a fill value //is supplied via the optional pad_with parameter. // //----------------------------------------------------------------------------------- //Parameter Description //array - 2D array to be wrapped (1D arrays not supported) //new_height - Number of rows in each wrapped block // //Optional Description //pad_with - Fill value used to pad incomplete blocks. If omitted, NA() is used. // //Lambda called: Echoλ WrapRows2Dλ= LAMBDA( array, new_height, [pad_with], //Check inputs LET( //Shape h, ROWS(array), w, COLUMNS(array), blocks, CEILING(h/new_height,1), //Optional pad_with, IF(ISOMITTED(pad_with),NA(),pad_with), //Total columns when unwrapped c, blocks * w, //Scenarios Is1D?, OR(h = 1,w = 1), IsScalar?, AND(h = 1, w = 1), InvalidDim?,new_height >= h, SpillRisk?, c > 16384, //Logic gate IF(IsScalar?,#VALUE!, IF(Is1D?,#VALUE!, IF(InvalidDim?,"#HEIGHT!", IF(SpillRisk?,#NUM!, //Proceed LET( //Indices - deferred i, LAMBDA(TOROW(Echoλ(SEQUENCE(,blocks,1,new_height),w)) + SEQUENCE(new_height,,0,1)), modulo, LAMBDA(MOD(SEQUENCE(,w * blocks),w)), j, LAMBDA(IF(modulo()=0,w,modulo()) * SEQUENCE(new_height,,1,0)), //Wrapped array result, IFERROR(INDEX(array,i(),j()),pad_with), result ))))))); //----------------------------------------------------------------------------------- //Echoλ //----------------------------------------------------------------------------------- //Author: Patrick H. //Date: 11/7/2025 //Version: 1.0 //Description: //Repeat each element in a supplied 1D array by specifying the repeat counts. //Arrays and scalars are supported. //----------------------------------------------------------------------------------- //vector - 1D array or scalar to be echoed //repeat - 1D array of repeat counts (must be numeric and ≥1) Echoλ = LAMBDA( vector, repeat, //Check inputs IF(OR(ISTEXT(repeat),repeat<=0),#VALUE!, LET( //Flatten inputs vector, TOCOL(vector), repeat, TOCOL(repeat), //Dimensions and row indexing V↕, ROWS(vector), R↕,ROWS(repeat), r, IF(V↕<>R↕,EXPAND(repeat,V↕,,@TAKE(repeat,-1)), repeat), i, SEQUENCE(ROWS(r)), m, MAX(r), idx, LAMBDA(TOCOL(IF(SIGN(r-SEQUENCE(,m,0,))=1,i,NA()),2)), //Unwrap idx but defer delivery until function invocation deliver, LAMBDA(INDEX(vector,idx())), deliver ))()); Workbook attached and linked in case this forum gobbles it up! Patrick2788/Excel-Lambda: Excel Lambda modules Excel-Lambda/Wrap2D Demo.xlsx at main · Patrick2788/Excel-Lambda Excel Lambda modules. Contribute to Patrick2788/Excel-Lambda development by creating an account on GitHub. github.com93Views4likes3CommentsHow do I auto-populate information from one tab to another in sheets?
I have an excel sheet with several tabs. The first tab is the Master tab used to track all tabs. I would like all new tabs to auto-populate information into columns on the master tab. For example, I have multiple fields in my form I would like information from these fields to auto-populate into the master spreadsheet. I would like all new forms/tabs to automatically update the master spreadsheet. I am currently entering everything manually.307KViews0likes26CommentsTop n vs. Others in Excel
Hi all, I'm seeking some help because I'm kind of new to the more intermediate stuff in Excel. I have an Excel table with the following columns: Subcategory in column A, Brand in column B, Region in column C, Year in column D and Values Month in column E. I want to create a PivotTable and a Pivot line chart from this PivotTable that ranks the Top 5 Brands vs. Other Competitors by each region. For added context: There are 5 subcategories, 3 regions and 25 brands. Currently, I've tried grouping the remaining 20 brands as "Other Competitors" vs. the Top 5 brands within a selected region and possibly all regions (when no selection is made). I'm seeking a solution similar to this... Please mind the colours. I will sort those out later. But, the problem that I'm faced with is that upon selection of a region, the PivotTable won't update to the Top 5 brands of a selected region because they've already been grouped. How can I make this more dynamic so that I'm able to show The Top 5 brands vs. Others? Please help. EDIT: My operating system is Windows 10 (64-bit) and I use Excel 365 (Desktop version). For reference, I've attached a link to a sample file. https://1drv.ms/x/c/b2d878e32a062614/IQC1wcnwLICcQasOfnGcwKn0ASjpXp9xQ6rjnOP10Jal5cc?e=HaXEWd Thank you all once again.Solved656Views2likes27CommentsReturn a value based on different parameters
Not sure if my title is describing my issue correctly. I have one column where each cell contains the same drop down list from which I can choose one of six options, and depending on what option is chosen, I want the cell in another column to return certain value: Option Chosen Return Value Not Started 0% Started 25% In Progress 50% Nearly There 75% Complete 100% I found this example formula online, which is only repeated once but works perfectly for two parameters: =IF(ISNUMBER(SEARCH("Not Started",F3)),"0%",IF(ISNUMBER(SEARCH("Started",F3)),"25%")) However, when I start to extend/repeat the formula more than once for the remaining parameters I cannot get it to work. I've extended it as follows... =IF(ISNUMBER(SEARCH("Not Started",F3)),"0%",IF(ISNUMBER(SEARCH("Started",F3)),"25%",IF(ISNUMBER(SEARCH("In Progress",F3)),"50%",IF(ISNUMBER(SEARCH("Nearly There",F3)),"75%",IF(ISNUMBER(SEARCH("Complete",F3)),"100%")) ... and it returns the error 'the formula is missing an opening or closing parenthesis' Please can anyone help with this. Thank you in advance.Solved55Views0likes4CommentsINDEX MATCH with VLOOKUP
This is my first time posting here, as I hit a roadblock that I'm sure is simple enough. I am using the following formula, but the source data ('FY26 Income Statement Data'!$A$4:$A$2158) has several rows with the same criteria on 'Cash Flow'!$A7. I think I need to include a VLOOKUP formula but I don't know how to do this. Any help will be appreciated. =INDEX('FY26 Income Statement Data'!$A$4:$AB$2158,MATCH('Cash Flow'!$A7,'FY26 Income Statement Data'!$A$4:$A$2158,0),MATCH('Cash Flow'!C$1,'FY26 Income Statement Data'!$A$4:$AB$4,0))92Views0likes1Comment