Office Scripts
457 TopicsDelete extra row
I have a document with 95 people, where I fill in 1 row for each of them for each day. One day I fill in 91 rows, the second day 89 rows, the third 94... (each day a different number of rows to fill in). After that entry, for each person I need to have 24 filled in rows for the last 24 days when I entered data. The next day I enter data for 92 people, for those 92 people I will have 25 filled in rows (the 25th row is extra and I have to delete it, now I do it manually). How can I delete that 25th row at once for all 92 people, so that I have 24 rows left for everyone?37Views0likes1CommentTable visual is not filtered due to dax measure
Hi Team, I have a visual as below: when i filter company as below: Table should give me records for selected company and not any other records. But the table here shows all records which means the filter is not recognized. for example, the site and device slicer shows correct records for filtered company but table is not: I guess the problem is due to the below dax online status: This brings in all records irrespective of the selected slicer. Could you please help me resolve this? Please advise! PFA file here PR0442 - Heatsense Live_V1 - Copy.pbix Thanks in advance! SergeiBaklanSolved57Views0likes1CommentAuto Generate a Timeline Based off Start and End Dates
Good Day All! Is there a way to enter a start date and end date (C2,C3) and have excel generate a table automatically that reflect all of the dates between start and end? I have posted a picture to show the rough idea.Solved59Views0likes3CommentsWhy does Remove Duplicates Excel online Automated Script work when created but not when re-run?
BACKGROUND: I have an Excel Online workbook that is populated by employees completing a Microsfot Online Form. Employees will submit multiple forms with updates, and each new submission creates a new row in the workbook in the "all responses" worksheet including their Full Name, the date the Form was submitted and the submission ID number. I want to create a second worksheet called "current responses" that only shows the most recent Form response (row) from each unique employee. I want to create an Automated Script to do this so my colleagues can quickly and repeatedly filter for current data without having to manually process the data (which will get messy with many users of varying Excel skill levels). I have written the Script that works when I create it, but when I try to test and re-run it, it spits out the wrong data. Why is this and how do I fix it? DATA PROCESSING: clear data in range A3-S1003 on current sheet ("current responses") refresh data copy data in range A1-S1000 on "all responses" sheet paste Values into current sheet A3 paste Formatting into current sheet A3 delete columns K-O on current sheet turn on column filtering custom sort rows by Form response date with most recent at the top (descending sort on column H) (standard Sort function is not recorded by Automate) Remove Duplicates on column "Full Name" custom sort rows by Form "Last Name" with most recent at the top (ascending sort on column B) (standard Sort function is not recorded by Automate) OUTCOME: Intended: gives a formatted table of 48 rows, one for each employee's most recent Form, ordered alphabetically by Last Name Actual: works when created, but when tested and re-run it spits out 6 rows of data. These are neither the duplicated nor the unique rows, so I'm not sure why those 6 are being returned. NOTES: - the paste function is done separately for Values and Format as the original data contains some formulae that I don't want copied over. - I can't use table.buffer in PowerQuery as PQ is not available with Excel Online CODE: function main(workbook: ExcelScript.Workbook) { let selectedSheet = workbook.getActiveWorksheet(); // Clear ExcelScript.ClearApplyTo.contents from range A3:S1003 on selectedSheet selectedSheet.getRange("A3:S1003").clear(ExcelScript.ClearApplyTo.contents); // Refresh all data connections workbook.refreshAllDataConnections(); let all_responses = workbook.getWorksheet("all responses"); // Paste to range A3 on selectedSheet from range A1:S1000 on all_responses selectedSheet.getRange("A3").copyFrom(all_responses.getRange("A1:S1000"), ExcelScript.RangeCopyType.values, false, false); // Paste to range A3 on selectedSheet from range A1:S1000 on all_responses selectedSheet.getRange("A3").copyFrom(all_responses.getRange("A1:S1000"), ExcelScript.RangeCopyType.formats, false, false); // Delete range K:O on selectedSheet selectedSheet.getRange("K:O").delete(ExcelScript.DeleteShiftDirection.left); // Toggle auto filter on selectedSheet selectedSheet.getAutoFilter().apply(selectedSheet.getRange("3:3")); // Custom sort on range range A4:S1002 on selectedSheet selectedSheet.getRange("A4:S1002").getSort().apply([{key: 7, ascending: false}], false, true, ExcelScript.SortOrientation.columns); // Remove duplicates from range A3:N1002 on selectedSheet selectedSheet.getRange("A3:N1002").removeDuplicates([2], true); // Custom sort on range range A4:S51 on selectedSheet selectedSheet.getRange("A4:S51").getSort().apply([{key: 1, ascending: true}], false, true, ExcelScript.SortOrientation.columns); }Solved47Views0likes1CommentUrgent for geography Coursework help (due tonight)
I compared 2 different areas using a visual housing survey and used 4 different categories - including exterior appearance, noise level, cleanliness and house plot size - I want to use statistical test to help my conclusion but i don't know which one and how64Views0likes1CommentEXCEL - WEBBROWSER FIT IMAGE SIZE
Hi, there a way to fit the image into the webbrowser? This is the code: Private Sub ListBox1_Change() Dim LTBL As ListObject Set LTBL = Planilha1.Range("Tabela1").ListObject WebBrowser1.Navigate ListBox1.Column(39) End Sub Excel 365 Windows 10 System 64611Views0likes1CommentOffice Scripts Custom Sort Failing During Automation
I am attempting to use office scripts within a OneDrive Excel document within Microsoft Teams to run a custom sort. Using the "Record Action" feature, I simply attempted to sort the range H3:J28 via the Timestamp or the H column. When running the custom sort manually, I get the below result, no errors. When I run the same action using the recorded Script, for some reason the values within the I and the J columns are swapped. Is there a way to avoid this? The relevant script is listed below. function main(workbook: ExcelScript.Workbook) { let selectedSheet = workbook.getActiveWorksheet(); // Custom sort on range range H3:J128 on selectedSheet selectedSheet.getRange("H3:J28").getSort().apply([{key: 0, ascending: true}], false, true, ExcelScript.SortOrientation.columns); }Solved161Views0likes7CommentsPython in Excel quota problem
I understand that there is a quota. It's normal because Microsoft's servers are not sufficient. However, there's a problem: I have an Excel file with a total of 22 tabs, each containing independent calculations. When I change the content of a single cell, all formulas in all Excel tabs start working. Why are they all running, and why am I not controlling this calculation or compilation process myself? I have Anaconda installed on my machine. If you allow me to run the Excel calculations with Python on my machine without limits, it would be an excellent solution. The same issue exists with GPT. We can't perform large calculations on your servers. GPT already says, "You can run this code." GPT and Python in Excel only support small calculations with a few formulas. Unfortunately, large-scale enterprise operations fail. Since no CPU or GPU solution is available right now, at least allow running Python within Excel on our own machines until this crisis is resolved. If this isn't possible, only calculate the formulas in the tab I'm currently working on. Additionally, let me control this calculation process. When writing a code, all lines of code are executed for each row. This is very unnecessary.234Views0likes5Commentsneed to create a macro to load images to cells which located in one drive
in column "i" and and column "P" i have linked hyperlink for images. when clicking on command button i need to load images to cells in columns "J" and "Q". MASTER TRACKER.xlsm can anyone help me to arrange a macro73Views0likes3CommentsHow to pull values from a different sheet based on a checkbox
I have a list of clients and their contact information on one sheet, and an invoice template on the other. I want to pull the clients' names and email addresses into a specific field on my invoice template, and I want to be able to do that by ticking a checkbox next to whoever's name I want to include. I can pull values of specific cells to the other sheet, so multiple sheets isn't the problem. I just don't know how to make it so I can tick a checkbox and have that pull the right information to where I need it.65Views0likes1Comment