Forum Widgets
Latest Discussions
Excel Challenge - Pivoting poorly structured data
This is from an ExcelBI challenge. I thought it may be worth while posting my solution here as a demonstration of modern Excel methods. Challenge Like many of such challenges, the natural solution approach is to use BYROW but that creates the usual 'array of arrays' error. Solution: Gradually I am moving to a point at which I have no formulas showing in the workbook other than calls to Lambda functions. In this case, the worksheet formuloa is = PIVOTBYCATEGORYλ(OrderTbl) The function works row by row apportioning the amounts against the listed categories PIVOTBYCATEGORYλ // Groups and pivots table by category = LAMBDA(table, LET( normalised, BYROWλ(table, APPORTIONλ), // Identify fields from normalised table dimension, TAKE(DROP(normalised,,1),,2), category, TAKE(normalised,,1), partCost, TAKE(normalised,,-1), // Pivot by category return, PIVOTBY(dimension, category, partCost, SUM,,0,,0), return ) ); The function APPORTIONλ divides the amount between categories so each record within the source data returns a number of rows APPORTIONλ // Splits by category and assigns costs = LAMBDA(record, LET( category, TOCOL(REGEXEXTRACT(INDEX(record,4),"\w+",1)), amount, INDEX(record,3) / COUNTA(category), year, YEAR(INDEX(record,1)), region, IF(LEN(INDEX(record, 2)), INDEX(record, 2), "Unknown"), broadcast, B∕CASTλ(HSTACK(region, year, amount), category), return, HSTACK(category, broadcast), return ) ); /* FUNCTION NAME: B∕CASTλ DESCRIPTION: Broadcasts the terms of a vector over the shape of a second array */ B∕CASTλ = LAMBDA(vector, array, IF({1}, vector, array)); The key to making the formula work is the function BYROWλ that I wrote to generalise the inbuilt but over-restrictive BYROW function. The PIVOTBY function returned the required crosstab from the normalised data arrayPeterBartholomew1Jan 17, 2026Silver Contributor79Views1like4CommentsChange in return of AVERAGE function - Mac Excel
I was puzzled that a spreadsheet I use daily generated an error today that had not existed in earlier versions. Attempts to confirm the validity of the spreadsheet functions by running prior versions that had previously run error free resulted in the same error. Eventually, it seems that the operation of the AVERAGE function has been changed in an Excel program update that was installed yesterday. Previously, if an AVERAGE function addressed a range of empty cells, it would return a zero value. Now it is returning the error #DIV/0! This is strange because the AVERAGE function will now return zero if the addressed range contains zeros rather than just being empty. Not sure if Microsoft intended this change or if the change might also apply to other functions. In muy case, I'm able to change my spreadsheet to provide for this but it would have been nice to have some warning.Stuart_MillerJan 16, 2026Copper Contributor42Views0likes1CommentCurrent Date and time per cell
I have a table with one column listing rows with a dynamic text box (open; closed) in the next column I would like to display the date and time when the status changes. The purpose is to show when a task was completed, I have used the now() function but it keeps refreshing, I need it stay the date The snip of the sheet below shows how is is currently working, so can any one help with some code for column J please. thank you LeeBuilditJan 16, 2026Copper Contributor78Views0likes4Commentsis it possible to capture HH:MM from the cell in text format DD-MM-YYYY HH:MM
Hi Expertise, Need you help again. I need to capture the HH:MM from another cell DD-MM-YYYY HH:MM (text format) as below From 16-01-2026 00:30 (text format) To 24:30 (HH:MM format) Regards LawrenceLawrence_Lam_320Jan 16, 2026Copper Contributor37Views0likes1CommentFormule voor zoeken tekst
Ik heb een formule FILTER die goed werkt alleen wil ik een tekst verkort invoeren zoals bij X.ZOEKEN. Probleem bij X.ZOEKEN is dat daar wordt weer niet meerdere rijen afgebeeld met dezelfde tekst zoals bij FILTER. Wie heeft een oplossing?edwin2021Jan 16, 2026Copper Contributor23Views0likes1CommentRandom Contractor Selection List
Hi, I would like to set up an automated random contractor list for tender purpose - is this possible? For example, I have Contractor 1 - Contractor 10, I would like to choose 2 contractors for each tender/quotation request randomly. Currently, it is done manually which is time consuming and could not ensure impartiality in selection - if I can setup the contractor rota to generate random selection, it would be wonderful. Please can anyone advise and help with the correct way to setup my excel sheet? Many thanksphuiyeeJan 16, 2026Copper Contributor36Views0likes3CommentsMultiple Inventory entries on the same item
Okay so I'm wondering if there is a way for excel to automatically advance to the next column when entering inventory data so if I need to make another entry on the same item I don't have to advance to the next cell myself. This would be helpful in streamlining inventory and making it foolproof when adding inventory to a specific item (without having to worry about deleting previously entered data). I'm hoping there is a way to do this so I can take a tablet when completing my inventory and avoid the old clipboard and paper.HarpoonsJan 15, 2026Copper Contributor39Views0likes2CommentsVariable "Connecting to Datasource" Load times
Hello, I am running into a strange issue that I am not sure how to solve. I am using Power Query to link to external Excel data files/Sheets and then I process the data within Power Query and also have some Macros that run after the data is refreshed. I am seeing a drastic difference in the amount of time it takes separate users to open/refresh this file (the users have the same internet connection, use the same link to the file on a Shared Drive on our servers, same Excel settings, and have the same hardware). Some users can load and run all Macros in < 15 seconds, while the others take > 10 minutes. I have exhausted all possible causes/reasons that I can think of and am looking for some guidance. Any and all suggestions are appreciated! Thanks, Skywalker_Skywalker_Jan 15, 2026Copper Contributor35Views0likes2Comments
Resources
Tags
- excel43,531 Topics
- Formulas and Functions25,231 Topics
- Macros and VBA6,533 Topics
- office 3656,258 Topics
- Excel on Mac2,711 Topics
- BI & Data Analysis2,462 Topics
- Excel for web1,992 Topics
- Formulas & Functions1,716 Topics
- Need Help1,703 Topics
- Charting1,682 Topics