Recent Discussions
Excel VBA – Target a specific named table when multiple ListObjects exist on each worksheet
My workbook has 12 sheets each having the name of a month. Each sheet contains a table named LotSize?? where ?? = number of the respective month as given below. Sheet name-Table name: January-LotSize01, February-LotSize02,...., December-LotSize12. Each of these tables have two columns named SCRIP and LotSize. I want a simple VBA code for following: 1] Clear the content of LotSize column of each such table from all 12 sheets. 2] Add text A, B, C, D, E in the cells of column SCRIP of each such table in all 12 sheets. I will later replace A, B, C, ...etc. with the actual scrip names as per requirement. Sub UpdateTables() Dim monthNames As Variant: monthNames = Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December") Dim vals As Variant: vals = Array("A", "B", "C", "D", "E") Dim ws As Worksheet Dim tbl As ListObject Dim lr As ListRow Dim i As Long Dim j As Integer For i = LBound(monthNames) To UBound(monthNames) Set ws = ThisWorkbook.Worksheets(monthNames(i)) If Not ws Is Nothing Then If ws.ListObjects.Count > 0 Then Set tbl = ws.ListObjects(1) With tbl If Not .DataBodyRange Is Nothing Then .DataBodyRange.Delete For j = 1 To 5 Set lr = .ListRows.Add lr.Range(tbl.ListColumns("SCRIP").Index) = vals(j - 1) Next j End With End If End If Set ws = Nothing Set tbl = Nothing Set lr = Nothing Next i End Sub Above code works only if each sheet has only one such table but I am having three different tables on each sheet with LotSize?? (?? = Month number) being one of them. How can we modify given code to incorporate this change so that the code operates on the desired table to achieve the stated objectives?Solved74Views0likes4CommentsTrying to fill Column using partial match from another Sheet
Not super tech nor Excel savvy, so I'm having issues trying to put words on what I'm trying to do for a Google search. Basically, I have an Excel file with 3 sheets; one has a list of all my company's clients with their phone numbers, one has a list of 400+ of the clients from the first sheet and a third one has a list of 80 of those clients. I'm trying to extract my client's phone numbers from the first sheet to both the others. My clients have numbers that can range from 1234-0 to 123456-0. The "-0" part can only be "-0" or "-1", but the first part ranges from 4 to 6 various numbers. However, both Sheets 2 & 3 have the number as is, while Sheet 1 has the first part in a column and the "-0" or "-1" in another column. In short, on the tables below, I think I would need a fonction in sheet 2 & 3's "Phone Number" column which could compare Sheet 1's "Client Number" column with Sheet 2 & 3's "Client Number" and if it finds a partial match (because of the "-0" or "-1" difference) extracts the info in the corresponding "Phone Number" column to the empty "Phone Number" column on Sheet 2 & 3. Using Excel version 2511 if that's useful. Sheet 1 (Full list) : Client Number -0 / -1 Client Name Phone Number 123456 -1 Microsoft 1234567890 9876 -0 Apple 9876054321 Sheet 2 & 3 (Smaller lists) : Client Number Client Name Phone Number 123456-1 Microsoft 9876-0 AppleSolved90Views0likes7CommentsCreate a person field in MS form to transfer to SP list
I am creating a MS form where I was wondering if there is a way to create a person field to search for people in my organization? I know I can use the record name function, but I need to guarantee anonymity. If there is a way that would be great, otherwise I'll just ask the user to put in their Email, and load it into a person field in SP with power automate. tySolved30Views0likes1CommentHow do I save an Excel Add-in (XLAM) file?
We had a new(er) version of Excel shoved on us and the result it it doens't do this, so we're sort of in a bad place. How do I save the add-in? We were probably on an old-ish version because it was stable and upgrades tend to break us - as they have here. I'm wondering how I save an add-in now. Right now our workflow is completely broken. When I go to File--> Save there is no xlam file type available now. I can still load an old xlam but I can't create a new one.Solved53Views0likes4Comments- 51Views0likes2Comments
AVERAGE reduced lambda on GROUPBY or BYROW formulas not working on specific workbook.
Currently using excel with spanish formulas. When using GROUPBY formula, i can use SUM, PRODUCT, LAMBDA, however AVERAGE (PROMEDIO) won't work on a specific workbook which previously has a lot of GROUPBYs that work properly. When I update the previously working formula, it now returns NAME error and PROMEDIO turns into Promedio. Inserting the function looks like this: I have no custom name called Promedio. This same GROUPBY formula works in different workbooks. Help would be appreciated. Best regardsSolved167Views0likes6CommentsExcel pads dynamic array output with #NV values
I have come across a couple of instances, where Excel 365 pads the output (of lambdas) or in this case of a specific formula within a lambda with #NV values (or errors if you like to treat them so.) The following snippet: = LAMBDA(assemblyName; LET( filteredParams; {"a";"b";"c"}; mappedValues; {1;2;3}; transposed; MTRANS(HSTAPELN(filteredParams; mappedValues)); return; WENN(filteredParams = ""; "NV"; transposed); return ))("fake") Gives me the following output: a b c 1 2 3 #NV #NV #NV At the same time, the following slightly different code (letting alone the output of WENN): = LAMBDA(assemblyName; LET( filteredParams; {"a";"b";"c"}; mappedValues; {1;2;3}; transposed; MTRANS(HSTAPELN(filteredParams; mappedValues)); return; WENN(filteredParams = ""; "NV"; transposed); transposed ))("fake") Spits out: a b c 1 2 3 This is not the only case, but is the simpliest, I can reconstruct this kind of error with. Do not mind the logic, it is an edited excerpt, just for illustration. P. S. It is German syntax. English would have TRANSPOSE, HSTACK, IF,... instead. Maybe a little difference in punctuation.Solved81Views0likes2CommentsCentral Forms repository
Hi, I want to create forms to be used company wide. We have locked Forms licensing down so that all staff cannot create forms, we want all data to be stored centrally and this way we know where all data is. If I create a Form, it creates it under my account. I if leave the organisation, this may be lost. What is the best way to create corporately used forms centrally?, i.e. not under an individual user account Thank you for your time, OllieSolved47Views0likes1CommentCumulative Sum of Each Column or Row
After studying various posts (answers) by members of this community, I developed a function that returns the cumulative sum of each column or row of an array: =LAMBDA(a,[by_row],LET( f,IF(by_row, LAMBDA(b,IF(ROWS(b)=1,b, LAMBDA(b-VSTACK(0,DROP(TAKE(b,,-1),-1)))())), LAMBDA(b,IF(COLUMNS(b)=1,b, LAMBDA(b-HSTACK(0,DROP(TAKE(b,-1),,-1)))()))), IF(by_row, LAMBDA(f(SCAN(0,a,SUM)))(), LAMBDA(f(TRANSPOSE(SCAN(0,TRANSPOSE(a),SUM))))()))) My goal is maximum efficiency. I am new to the concept of lazy evaluation, so I'm wondering if you could explain the flow in detail and whether there is a pair of sets of parentheses too much. Of course, I'm open to improvements.Solved200Views1like8CommentsExcel 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 arraySolved334Views2likes7CommentsChange 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.Solved154Views0likes3CommentsFormula Help for Sorting
Hi all! I am looking to find a formula that will do a multitude of things. One is to sort a column of numbers by the last 2 digits of the values input but by a particular order such as 00-14, 15-29, 30-42. Secondly, once sorted by this grouping, I want to assign it to a particular department based on said sort (Dept 1, 2, 3 and so forth. I have attempted to use the VLookup formula that Google AI gave me to no avail. I received an error. Also with a IF formula and haven't been able to figure out how to make this work. Any help would be greatly appreciated!Solved171Views0likes4CommentsWant a formula result to update across Sheets?
I have figured out how to get a formula result to appear in multiple sheets. The formula for example that gets pasted into sheets references a result! I enter formula and (B5) is where the sum location of =sum(b1:b3) will be delivered' I create a new formula that will reference previous calculation label this in cell B7 =Aux!B5 I use =Aux!B5 where Aux is the sheet where all calculations take place and this result will want to appear in selected work sheets Then i select sheets (using Shift+ selected sheets) then in first sheet of selected sheets I select a location and paste V (value) i get the result across all selected tabs. Here is my question ! how do i get a location to update all worksheets with a value from a formula from sheet Aux? I want to be able to change the Value in Aux (sheet where all calculations occur), then have that new value appear where former locations were pasted the result. (this should put result in B22 Ex: i create a total =sum(B1:B3) (in A22 of the aux sheet ) that result i put in a new location with a new formula so new location ( B22) formula =aux!A22 It is this location that if i change a value in origional EX: b1 from 3 to 5 the result is updated in B22 but it will not update the sheets with =aux!B22 hope not to confusingSolved177Views0likes5CommentsTop 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.Solved396Views2likes13CommentsPLEASE HELP ME. Excel Time Formatting Not Working?
PLEASE HELP ME!!! I created an excel workbook for tracking fitness workouts, I record the data such as weight lifted, number of reps, and rest times between sets. I formatted the cells so they express your rest times in terms of minutes and seconds (I used the custom "H:MM" format of time option). But whenever I record the amount of time you spend during cardio exercise, the formatting gets COMPLETELY SCREWED UP because when I type 28:44 (28 minutes and 44 seconds) of cardio duration, it instantly turns into 4:44 (4 minutes and 44 seconds). But if I type 20:00 (20 minutes) of cardio duration, it stays as 20:00 (20 minutes) and it never turns into something else. Why do some of the numbers like 28:44 transform into a complete different number when I enter them? I uploaded 3 screenshots below to better express what I mean. 'Solved168Views0likes4CommentsExcel ignoring part of formula
=IF(F3="","",IF(F3-G3=0.01,1,IF(F3>G3,3,IF(F3=G3,1,IF(F3<G3,0))))) My cells F3 & G3 refer to a match score, with the Result showing (in Cell AM3) being 3pts for a win, 1 point for a Draw, and 0 for losing. Therefore if F3 and G3 are equal (45-45) it does show 1 in AM3 Due to the vagaries of our sport, I also want a score of 45.01- 45 to show as a draw an AM3, hence my formula attempt in AM3:- =IF(F3="","",IF(F3-G3=0.01,1,IF(F3>G3,3,IF(F3=G3,1,IF(F3<G3,0))))) but AM3 shows the result as a Win (3pts) as if it is ignoring my initial F3 statement F3-G3=0.01. Can anybody help? ThanksSolved76Views0likes3Comments
Events
Recent Blogs
- A look back at 2025’s biggest achievements with Microsoft Education offerings.Jan 30, 2026145Views0likes0Comments
- [This article was originally published by Sumit Chauhan on LinkedIn.] AI systems perform robust computation, but their outputs are typically dissociated from the structure of the computation itself...Jan 29, 2026241Views0likes1Comment