macros and vba
6556 TopicsExcel repair strips all formulas from large .xlsm after March 2026 security update (KB5002849)
Hi everyone, I'm a master's student at Karolinska Institutet in Stockholm. My thesis is a health economic cost-effectiveness model built entirely in Excel — a gender-neutral static Markov cohort model with 34 worksheets. The file has become completely unusable after what I believe is the March 2026 security update, and I'm running out of options. The file: - .xlsm, ~46.5 MB compressed, ~370 MB uncompressed XML - 34 worksheets, four of which are 73–92 MB each (Markov trace sheets) - ~65,000 formulas, ~33,500 shared formulas - Heavy use of LET, LAMBDA, XLOOKUP, XMATCH, CHOOSECOLS, TAKE, MAP, SWITCH - 771 defined names including ~147 hidden _xlpm.* LET/LAMBDA variable placeholders - Stored on OneDrive via KI SharePoint, 34,000+ AutoSave revisions - Contains VBA (vbaProject.bin) The problem: Every time I open the file — on Excel for Mac or Excel Online — the repair engine triggers and strips ALL formulas from every sheet, replacing them with cached values. The file shrinks from ~46.5 MB to ~26 MB. Clicking "No" on the repair dialog just closes the file. There is no way to bypass the repair. What I've verified: - Extracted the .xlsm as a ZIP and confirmed all formulas (<f> tags) are fully intact in the raw XML - Libr€Office Calc can read the formulas but cannot execute them (Err:508 — no LET/LAMBDA support) - Removed 158 broken named ranges (#REF! and #NAME? entries) from workbook.xml and rebuilt the archive — repair engine still strips all formulas - The issue reproduces on every OneDrive version history copy (up until I largely used LET formulas in my sheets - but there is still 1,5months of changes lost) - The issue reproduces on both Excel for Mac and Excel Online Suspected cause: The March 10, 2026 security update (KB5002849) patched CVE-2026-26108, a heap overflow in Excel's file parsing during loading. The same patch was applied to Office Online Server (KB5002846). I believe the tightened parsing now rejects or flags my file's large XML structures as potentially malicious, triggering the repair engine to strip all formulas. This is consistent with: - The known _xlfn. namespace bug on Excel for Mac (reported by multiple users on Microsoft Q&A since late 2024) - The timing - the file was working before this update flawlessly up until March 16th - The fact that Excel Online is also affected (same server-side patch) My questions to the community: 1. Has anyone else experienced formula stripping on large workbooks after the March 2026 update? 2. Is there a way to bypass the repair engine on Mac, or roll back the specific security patch without downgrading all of Office? 3. Would opening this file on Windows Excel (pre-patch or current) preserve the formulas? If anyone with a Windows PC would be willing to try opening and re-saving this file, I would be incredibly grateful. 4. Is there now effectively a size/complexity ceiling for Excel workbooks that makes models like this unviable? If so - should I be migrating this to another environment (R, Python, etc.) going forward? This file represents six months of thesis work. The formulas are all there in the XML. I just need Excel to stop destroying them on open. Any help, pointers, or similar experiences would be hugely appreciated. Thank you, Florian Boschek11Views0likes0CommentsI need help with the baseball file.
I need help with the baseball file. Thes Teams Do Not Do Anything To Blue Jays White Sox Red Sox Column B At Astros I Want @Astros All Other Teams To Mariners At I Want Vs Mariners All Other Teams To Column C Change Time To One Hour Earlier Trim All Cells I Want Vba Code Thank you very much83Views0likes3CommentsNeed a consecutive XLookup
Hello All, OK let me describe what I am trying to do: I need to create a Task List. In this list I will have let’s say 200 tasks, and 50 people to perform these tasks. i need a way to assign the first task to the first person, then the second task to the second person, then the 3rd task to the 3rd person and so on until the first 50 tasks are assigned. then I need to assign the 51st task to the first person, the 52nd to the second person, and the 53rd task to the 3rd person until that batch of tasks and People are matched. but this is not linear, I may want to choose task 52 to person 3 because the 3rd task is related to the 52nd task. i can live without this feature and fine tune the list manually but the main question is how can I look up a name and match it to a task. i hope this makes sense to you, please ask for any clarification and i shall add that bit. thanks in advance… wassim93Views0likes3CommentsFilling a column with succeeding lists
Hi, I need a list of files, with numbers starting from 001 for each box. Adding the number for one box is easy but I have thousands of them. A box number is like "0001AA0001". The first number and the letters never change, so I have : 0001AA0001 0001AA0002 0001AA0003 Then I have to add the files numbers, like "0001AA0001/001". I already have a line for each file, but only with the box number in the forst column, repeated several times, each time for every file. What I have What I need 0001AA0001 0001AA0001/001 0001AA0001 0001AA0001/002 0001AA0001 0001AA0001/003 0001AA0002 0001AA0002/001 0001AA0002 0001AA0002/002 0001AA0003 0001AA0003/001 0001AA0004 0001AA0004/001 0001AA0004 0001AA0004/002 0001AA0004 0001AA0004/003 Can you please tell me how can I add automatically the /001 and so on without having to do it for each box ? I can't manage to use a model for CTRL+E and I'm not accustomed to use the functions. Thanks, M.T.97Views0likes3CommentsUsing excel to prepare a detailed income and tax computation for federal taxes USA.
I am toying with the idea of preparing a comprehensive excel workbook for preparing a computation of income, adjustments, deductions, taxes and credits similar to a software helping to prepare 1040 return. My idea is not exactly to prepare a tax forms for submission but a computation summary of four to five pages which helps the tax payers to appreciate their income and taxes (as against 200+ pages of tax return). Technically it will be a full fledged software but will be also a very good review and visulation tool and mybe a tax planning tool later. Is excel a good place to do that? Will python with excel be able to handle? I am a tax professional but not a tech guy. I am only looking at Federal preparation as of now.4.5KViews0likes2CommentsSigned macros are blocked without notification.
Following problem: if the security policy "Disable all except digitally signed macros" is enabled in Excel, signed macros usually work, but sometimes they are simply disabled without any message and cannot be executed, even though the signature is valid. Have already tried the following: re-inserting the signature, recreating and recompiling the macros, saving the file in a different format – all without success. The signature in the macro is valid, but Excel blocks execution without any message. How can this problem be solved? Can i attach an affected file hier?62Views0likes2CommentsNeed help autofilling.
Good morning all, Thought I posted this but I am not seeing it anywhere so I apologize if this is a repeat. I was tasked with filling in a spreadsheet with data including; Our part number, our description, supplier name, supplier number assigned by us, and supplier part number. I noticed that a lot of the part numbers repeat so I am trying to find a way so that when the column with our part number repeats it will auto fill the columns with the supplier name, supplier number and supplier part number automatically when I enter a repeating part number if possible. I am very much not excel savvy but I am pretty computer literate. I have attached the document I am working on, there is no customer data what so ever and all part numbers are internal so are not proprietary. https://gpcompinc-my.sharepoint.com/:x:/g/personal/zachv_gpcompanies_com/IQCj4grl62sHQYohshZJ9Mb2AX7_MknXYW1QiMk8wv2sdfQ?e=duyOxLSolved182Views0likes3CommentsOperations Dashboard in Excel
Ok, so I have been tasked to build an operational dashboard for an airline maintenance planning and tracking. I have a dataset downloaded from our ERP system that lists down the aircraft tails, the workorder number, tasks in each workorder, manhours for each task, city, site(hangar or line) and the start date and end dates. There are codes that are assigned for each category of workorder, whether it is a C-Check, Line or transit. In the current scenario, we use a flight operations tracking software that gives us a hangar forecast, but then we have to get the dataset (as mentioned above) and then build a report daily to show the tails assigned for each port and then the total manhours. The report looks something similar to what you see below. Now, instead of doing it daily manually, I want to automate the process. So far, I have been able to sum the total manhours for the day, get the tails assigned for each port and location, and achieve some sort of conditional formatting to distinguish between different types of checks - green for heavy, yellow for transit and so on. What I have been unable to achieve is the aircraft is scheduled for two days grounding in the hangar, then the cells on both days should align together. As you can see in the image above, VH-AA6 has maintenance on the 8th and 9th of March, but the cells are not aligned. I tried to find a difference between the start and end date and create a helper column to assign a priority, but it didn't work. I have spent countless hours on Chatgpt to come up with a solution, but all efforts went in vague. I have seen a similar excel sheet elsewhere, but I couldn't extract the formulas or the logic since it was heavily protected. In the end I want to add a search bar and a to find a Rego/ Tail by typing in the search field and highlight in the sheet quickly. The main aim is the cell alignment for the consecutive dates. So lets say AA6 is occupying D2 on Day 8, then on the Day9 AA6 should pop up in E2. Any other aircraft on the Day9 with a day's grounding may appear in E1, or next available empty cell.308Views0likes9Comments"Method 'Calculation' of object '_Application' failed" error occurs on unpredictable attempts
At random times, this save code decides to spit the "Method 'Calculation' of object '_Application' failed" error. It doesn't happen on any other userforms. Any idea why? Private Sub CommandButton2_Click() 'Save 'Initial: On Error Resume Next Dim rng As Range, cell As Range Dim first_DB_avail_row As Range Dim Highest_Version_Row As Long Dim existingVersions() As String Dim ver_find As Variant Dim ver_list As Object: Set ver_list = CreateObject("System.Collections.ArrayList") 'Use an ArrayList for version sorting Dim padded_list As Object: Set padded_list = CreateObject("System.Collections.ArrayList") 'Create a temporary list for padded versions to ensure order (e.g., 5.1.28 > 5.1.2) Dim v As Variant, parts As Variant Dim padded_v As String, leadChar As String, all_vers As String Dim i As Integer 'Validate entries: If Me.Caption = "First Version - Business Manager" Then 'Adding product - first version If Me.ComboBox1.Value = "" Or Me.TextBox1.Value = "" Or _ Me.TextBox2.Value = "" Or Me.TextBox3.Value = "" Then 'Check if version is not inputted MsgBox "You must complete all fields.", vbExclamation, "Business Manager" GoTo MEM_CLEAN End If Insert_Product.ver_val = stage_entry & Major & Minor & Patch Unload Me Insert_Product.new_product_ver_cancel = False 'Set back to false from the terminate sub setting GoTo MEM_CLEAN End If Call Find_Latest_Ver 'Get the current latest version If stage_entry & Major & Minor & Patch = Highest_Version Then 'Check if version already exists MsgBox "This version already exists (as the newest version).", vbExclamation, "Business Manager" GoTo MEM_CLEAN End If existingVersions = Split(Replace(Me.TextBox4.Value, vbCrLf, ""), "• ") For Each ver_find In existingVersions If Trim(ver_find) = Trim(stage_entry & Major & Minor & Patch) Then MsgBox "This version already exists.", vbExclamation, "Business Manager" GoTo MEM_CLEAN End If Next ver_find If Me.ComboBox1.Value = "" Or Me.TextBox1.Value = "" Or _ Me.TextBox2.Value = "" Or Me.TextBox3.Value = "" Then 'Check if version is not inputted MsgBox "You must complete all fields.", vbExclamation, "Business Manager" GoTo MEM_CLEAN End If Me.Hide 'This will preserve public variables, keeping the form loaded, while still allowing the PLZ_WAIT userForm to display (no modal error) 'Macro Enhancement - Start: Application.Calculation = xlCalculationManual ActiveWorkbook.UpdateRemoteReferences = False Application.EnableEvents = False 'This must be false Application.ScreenUpdating = False Application.Interactive = False Application.DisplayAlerts = False Application.DisplayStatusBar = False PLZ_WAIT.Show PLZ_WAIT.Label2.Caption = "Setting new version" DoEvents 'Allows the PLZ_WAIT userForm to display If Err.Number <> 0 Then 'For some unknown reason, the Excel error "Method 'Calculation' of object '_Application' failed" occurs on unpredictable/unrepeatable attempts to save (sub runs) - cause unknown MsgBox "An Excel error occured (""" & Err.Description & """: " & Err.Number & "). Please try again (until it works).", vbExclamation, "Business Manager" GoTo MEM_CLEAN End If 'Pull data from the latest version: ThisWorkbook.Sheets("Products").Unprotect Password:=ThisWorkbook.Sheets("Background Data").Range("CY39").Value For Each cell In ThisWorkbook.Sheets("Background Data").Range("E4:E7503") If cell.Value = ThisWorkbook.Sheets("Products").Range("E" & Selection.Row).Value Then If cell.Offset(0, -2).Value = Highest_Version Then ThisWorkbook.Sheets("Products").Range("B" & Selection.Row).Value = cell.Offset(0, -3).Value 'Name ThisWorkbook.Sheets("Products").Range("C" & Selection.Row).Value = stage_entry & Major & Minor & Patch 'Product Version ThisWorkbook.Sheets("Products").Range("D" & Selection.Row).Value = cell.Offset(0, -1).Value 'File ThisWorkbook.Sheets("Products").Range("E" & Selection.Row).Value = cell.Value 'ID Number ThisWorkbook.Sheets("Products").Range("F" & Selection.Row).Value = cell.Offset(0, 1).Value 'Category ThisWorkbook.Sheets("Products").Range("G" & Selection.Row).Value = cell.Offset(0, 2).Value 'Details (Description) ThisWorkbook.Sheets("Products").Range("K" & Selection.Row).Value = cell.Offset(0, 6).Value 'Release Date ThisWorkbook.Sheets("Products").Range("L" & Selection.Row).Value = cell.Offset(0, 7).Value 'Copyright Y/N button ThisWorkbook.Sheets("Products").Range("M" & Selection.Row).Value = cell.Offset(0, 8).Value 'Copyright Status ThisWorkbook.Sheets("Products").Range("N" & Selection.Row).Value = cell.Offset(0, 9).Value 'Year ThisWorkbook.Sheets("Products").Range("O" & Selection.Row).Value = cell.Offset(0, 10).Value 'Copyright Statement ThisWorkbook.Sheets("Products").Range("P" & Selection.Row).Value = cell.Offset(0, 11).Value 'Published Y/N button ThisWorkbook.Sheets("Products").Range("Q" & Selection.Row).Value = cell.Offset(0, 12).Value 'Publish Status (Date) ThisWorkbook.Sheets("Products").Range("R" & Selection.Row).Value = cell.Offset(0, 13).Value 'Web Link ThisWorkbook.Sheets("Products").Range("S" & Selection.Row).Value = cell.Offset(0, 14).Value 'Withdraw Date Highest_Version_Row = cell.Row Exit For End If End If Next cell 'Save new version to version database: Set first_DB_avail_row = ThisWorkbook.Sheets("Background Data").Range(ThisWorkbook.Sheets("Background Data").Range("C7506").End(xlUp).Offset(1, 0).Address) first_DB_avail_row.Offset(0, -1).Value = ThisWorkbook.Sheets("Products").Range("B" & Selection.Row).Value 'Name first_DB_avail_row.Value = ThisWorkbook.Sheets("Products").Range("C" & Selection.Row).Value 'Product Version first_DB_avail_row.Offset(0, 1).Value = ThisWorkbook.Sheets("Products").Range("D" & Selection.Row).Value 'File first_DB_avail_row.Offset(0, 2).Value = ThisWorkbook.Sheets("Products").Range("E" & Selection.Row).Value 'ID Number first_DB_avail_row.Offset(0, 3).Value = ThisWorkbook.Sheets("Products").Range("F" & Selection.Row).Value 'Category first_DB_avail_row.Offset(0, 4).Value = ThisWorkbook.Sheets("Products").Range("G" & Selection.Row).Value 'Details (Description) first_DB_avail_row.Offset(0, 8).Value = ThisWorkbook.Sheets("Products").Range("K" & Selection.Row).Value 'Release Date first_DB_avail_row.Offset(0, 9).Value = ThisWorkbook.Sheets("Products").Range("L" & Selection.Row).Value 'Copyright Y/N button first_DB_avail_row.Offset(0, 10).Value = ThisWorkbook.Sheets("Products").Range("M" & Selection.Row).Value 'Copyright Status first_DB_avail_row.Offset(0, 11).Value = ThisWorkbook.Sheets("Products").Range("N" & Selection.Row).Value 'Year first_DB_avail_row.Offset(0, 12).Value = ThisWorkbook.Sheets("Products").Range("O" & Selection.Row).Value 'Copyright Statement first_DB_avail_row.Offset(0, 13).Value = ThisWorkbook.Sheets("Products").Range("P" & Selection.Row).Value 'Published Y/N button first_DB_avail_row.Offset(0, 14).Value = ThisWorkbook.Sheets("Products").Range("Q" & Selection.Row).Value 'Publish Status (Date) first_DB_avail_row.Offset(0, 15).Value = ThisWorkbook.Sheets("Products").Range("R" & Selection.Row).Value 'Web Link first_DB_avail_row.Offset(0, 16).Value = ThisWorkbook.Sheets("Products").Range("S" & Selection.Row).Value 'Withdraw Date 'Save Development Status Data to new version from latest version (copy over): first_DB_avail_row.Offset(0, 17).Value = ThisWorkbook.Sheets("Background Data").Range("T" & Highest_Version_Row).Value 'Title first_DB_avail_row.Offset(0, 18).Value = ThisWorkbook.Sheets("Background Data").Range("U" & Highest_Version_Row).Value 'Tags first_DB_avail_row.Offset(0, 19).Value = ThisWorkbook.Sheets("Background Data").Range("V" & Highest_Version_Row).Value 'Content first_DB_avail_row.Offset(0, 20).Value = ThisWorkbook.Sheets("Background Data").Range("W" & Highest_Version_Row).Value 'Total Tasks first_DB_avail_row.Offset(0, 21).Value = ThisWorkbook.Sheets("Background Data").Range("X" & Highest_Version_Row).Value 'Complete Tasks first_DB_avail_row.Offset(0, 22).Value = ThisWorkbook.Sheets("Background Data").Range("Y" & Highest_Version_Row).Value 'Platform first_DB_avail_row.Offset(0, 23).Value = ThisWorkbook.Sheets("Background Data").Range("Z" & Highest_Version_Row).Value 'Medium first_DB_avail_row.Offset(0, 24).Value = ThisWorkbook.Sheets("Background Data").Range("AA" & Highest_Version_Row).Value 'Framework first_DB_avail_row.Offset(0, 25).Value = ThisWorkbook.Sheets("Background Data").Range("AB" & Highest_Version_Row).Value 'Stage first_DB_avail_row.Offset(0, 26).Value = ThisWorkbook.Sheets("Background Data").Range("AC" & Highest_Version_Row).Value 'Dev Log (1) first_DB_avail_row.Offset(0, 102).Value = ThisWorkbook.Sheets("Background Data").Range("DA" & Highest_Version_Row).Value 'Dev Log (2) first_DB_avail_row.Offset(0, 103).Value = ThisWorkbook.Sheets("Background Data").Range("DB" & Highest_Version_Row).Value 'Dev Log (3) first_DB_avail_row.Offset(0, 104).Value = ThisWorkbook.Sheets("Background Data").Range("DC" & Highest_Version_Row).Value 'Dev Log (4) first_DB_avail_row.Offset(0, 105).Value = ThisWorkbook.Sheets("Background Data").Range("DD" & Highest_Version_Row).Value 'Dev Log (5) first_DB_avail_row.Offset(0, 106).Value = ThisWorkbook.Sheets("Background Data").Range("DE" & Highest_Version_Row).Value 'Dev Log (6) first_DB_avail_row.Offset(0, 107).Value = ThisWorkbook.Sheets("Background Data").Range("DF" & Highest_Version_Row).Value 'Dev Log (7) first_DB_avail_row.Offset(0, 27).Value = ThisWorkbook.Sheets("Background Data").Range("AD" & Highest_Version_Row).Value 'Total Bugs first_DB_avail_row.Offset(0, 28).Value = ThisWorkbook.Sheets("Background Data").Range("AE" & Highest_Version_Row).Value 'Resolved Bugs first_DB_avail_row.Offset(0, 29).Value = ThisWorkbook.Sheets("Background Data").Range("AF" & Highest_Version_Row).Value 'Total Requests first_DB_avail_row.Offset(0, 30).Value = ThisWorkbook.Sheets("Background Data").Range("AG" & Highest_Version_Row).Value 'Complete Requests first_DB_avail_row.Offset(0, 31).Value = ThisWorkbook.Sheets("Background Data").Range("AH" & Highest_Version_Row).Value 'Start Date first_DB_avail_row.Offset(0, 32).Value = ThisWorkbook.Sheets("Background Data").Range("AI" & Highest_Version_Row).Value 'End Date first_DB_avail_row.Offset(0, 33).Value = ThisWorkbook.Sheets("Background Data").Range("AJ" & Highest_Version_Row).Value 'Total Work Days first_DB_avail_row.Offset(0, 34).Value = ThisWorkbook.Sheets("Background Data").Range("AK" & Highest_Version_Row).Value 'Lines of Code first_DB_avail_row.Offset(0, 35).Value = ThisWorkbook.Sheets("Background Data").Range("AL" & Highest_Version_Row).Value 'Number of Features/Amenities first_DB_avail_row.Offset(0, 36).Value = ThisWorkbook.Sheets("Background Data").Range("AM" & Highest_Version_Row).Value 'Ease of Use first_DB_avail_row.Offset(0, 37).Value = ThisWorkbook.Sheets("Background Data").Range("AN" & Highest_Version_Row).Value 'Innovation/Uniqueness first_DB_avail_row.Offset(0, 38).Value = ThisWorkbook.Sheets("Background Data").Range("AO" & Highest_Version_Row).Value 'Complexity first_DB_avail_row.Offset(0, 39).Value = ThisWorkbook.Sheets("Background Data").Range("AP" & Highest_Version_Row).Value 'Optimization first_DB_avail_row.Offset(0, 40).Value = ThisWorkbook.Sheets("Background Data").Range("AQ" & Highest_Version_Row).Value 'Customer Request/Cater 'Set version list: Set rng = ThisWorkbook.Sheets("Background Data").Range("E4:E7503") ver_list.Add stage_entry & Major & Minor & Patch 'Add initial version For Each cell In rng 'Loop to add matches - Collect all versions If cell.Value = ThisWorkbook.Sheets("Products").Range("E" & Selection.Row).Value Then ver_list.Add cell.Offset(0, -2).Value End If Next cell 'Temporarily convert each version into sortable key (000.000.000) For i = 0 To ver_list.Count - 1 v = ver_list(i) leadChar = Left(v, 1) parts = Split(Mid(v, 2), ".") padded_v = leadChar padded_v = padded_v & Right("000" & parts(0), 3) padded_v = padded_v & Right("000" & parts(1), 3) padded_v = padded_v & Right("000" & parts(2), 3) ver_list(i) = padded_v & "|" & v 'Store padded key + original version 'Note: This converts, for example, "V54.17.44" to "V054017044" in order to sort, for each version (i) Next i 'Sort (descending) then strip padded key: ver_list.Sort: ver_list.Reverse For i = 0 To ver_list.Count - 1 ver_list(i) = Split(ver_list(i), "|")(1) Next i 'Note: This sorts then reverses the sort for highest version to be on top. Since sorting is left-to-right, major number will sort first, then minor, _ then patch, in that order. For the release, order will be A then B then V, since that's the alphabet's order, then it's reversed causing the order to be V then B then A. _ Basically, it is sorted lexicographically (V > B > A) then numerically (000000000), then reversed for descending order, then converted back to versioning format. 'Set validation: all_vers = " ," & Join(ver_list.ToArray, ",") 'Join all in array into one string and add initial blank option (for adding new when selected), for setting validation With Selection.Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:=all_vers .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = False .ShowError = False End With ThisWorkbook.Sheets("Products").Protect Password:=ThisWorkbook.Sheets("Background Data").Range("CY39").Value 'Macro Enhancement - End: Application.Calculation = xlCalculationAutomatic ActiveWorkbook.UpdateRemoteReferences = True Application.EnableEvents = True Application.ScreenUpdating = True Application.Interactive = True Application.DisplayAlerts = True Application.DisplayStatusBar = True 'Final: Unload Me 'This clears "Highest_Version" and all public variables ?....... Sheet2.UPDATE_DB_FORCE = True Application.Run "Sheet2.Worksheet_Change", Selection 'Necessary in order to update Pricing and CUS_PRO_RATINGS sheets with new version Sheet2.UPDATE_DB_FORCE = False 'Release variables/objects from memory: MEM_CLEAN: Unload PLZ_WAIT: Set PLZ_WAIT = Nothing Set rng = Nothing Set cell = Nothing Set first_DB_avail_row = Nothing ver_list.Clear: Set ver_list = Nothing Set padded_list = Nothing End Sub182Views0likes5Comments