excel
44216 TopicsExcel Formula Help
Hi everyone again, so I am trying to pull data from one tab (DATA) to another tab (MRD ABC123, SLRD ABC123, etc..) there are examples in the first 2 tabs (MRD & SLRD ABC123) of how i am trying to pull this data over. I have tried formulas and have had some help on here as well to try some formulas but nothing is wanting to work. The data on the DATA tab is being copied and pasted from a Microsoft Forms. the columns i want to transfer the data to their perspective tabs is in Orange (Column F - R) Any help on this would be greatly appreciated. I have attached the spreadsheet belowSolved222Views0likes13CommentsFinding Possible Matches to a Solution
Hello Everyone, I'm wondering if anyone has any tricks or formulas that I can use to find any possible combination of numbers that will create the desired solutions I'm looking for. Take a look at the picture I uploaded for reference. If I have a list of data in column A, I will be looking for a given set of numbers that will create a sum that matches column C. I'm looking for a trick or formula that will return all possible combination of numbers that will sum up to equal Column C and then return those possible combinations in another column for me to see (for example like what you see in columns E, F, & G). Does anyone have any ideas on how or if this can be done? I would like to do this without the use of complicated macros or other codes if possible.166Views3likes5CommentsRack of Lambda
There’s been a lot of content shared recently to commemorate the upcoming 40th anniversary of Microsoft Excel. Personally, I’ve only been using Excel for around half that time, but October also marks my 2-year anniversary since "joining the conversation" on this forum. As a gift from me to you (anyone interested), I’ve spent some time over the past few weeks revisiting old posts, updating methods I shared previously and packaging them into a collection of generalized Lambda functions to assist with a variety of common array manipulation and transformation scenarios. The attached file contains some 35+ Lambda functions, ranging from very simple concepts to much more advanced techniques. You can also import them directly from my gist, if desired. While they were all compiled and composed of my own accord, I would be remiss if I failed to credit the community and its members as a major resource in my own development. The amount of knowledge, tips and tricks gained through community collaboration is simply invaluable. You may notice some recurring themes in the way I’ve written many of the functions. For example, I like to keep the optional arguments as simple as possible, using either Boolean values passed to IF, or numeric options from 0 to 3 passed to CHOOSE. Also, many of the array transformation functions use TOCOL-IF-SEQUENCE in one way or another, with MOD-QUOTIENT-SEQUENCE used only a few times in the more complex algorithms (e.g. HWRAP and VWRAP). The collection also includes a few examples of Lambda recursion, the most notable being PF (Prime Factorization). CROSSJOINM was written as a "how-to" demonstration for filtering multiple optional arguments using LAMBDA and NOT-ISOMITTED. There’re also some powerful scanning functions like SCAN3, which can handle multiple input arrays, as well as EVALS with VALS2 to VALS7, which can store and recall multiple variables at each iteration (useful for corkscrew calculations). What you won’t find, however, are methods that use INDEX in an iterative manner with functions like MAKEARRAY, SCAN, etc. as these are only efficient when iterating over a range reference (they will bog down considerably and become practically unusable after just a few thousand iterations when looping over an array object). As such, I don’t recommend them as "generalized" solutions, although they can be very effective on a case-by-case basis. Similarly, you will only find 2 examples in this collection that use REDUCE-STACK in a limited capacity, with fewer than 10 iterations, as I also consider this to be a method of last resort due to its problems with efficiency when the number of iterations cannot be controlled. Hopefully one or two of them proves useful. If not, no big deal. Many of the examples in the attached file are interactive, so you can see how the different options affect the output. For those brave enough, please feel free to share your own custom functions too. I’d love to see what you got. Cheers!18Views1like0CommentsWorking with workbooks shared via Teams/Sharepoint
Hello Excellers, I need some insight on an issue that I am not sure what the source is... A) We sometimes share workbooks via Teams. You know when you are in a particular chat and next to the name of the chat at the top of the screen you see Shared and then you see Files button a bit below the Shared menu and when you click on that Files button you will see a list of what workbooks are shared. B) So I wrote some VBA code to download a copy to the Downloads folder like that: Dim RetVal As Long Dim SharePointFileURL As String Dim LocalDownloadPath As String Dim FileName As String RetVal = URLDownloadToFile(0, SharePointFileURL, LocalDownloadPath & FileName, 0, 0) If RetVal = 0 Then MsgBox "File successfully downloaded to: " & LocalDownloadPath & FileName, vbInformation This will message be replaced by the code we need to run... but for now I needed an indicator that it finished downloading. Else MsgBox "Failed to download the file. Please check the URL or your network connection.", vbExclamation End If So RetVal is = 0, and I do see the workbook in the \Downloads folder and it has a size of 4KB and the correct Date Modified time stamp, BUT When I try to open the workbook via the Excel desktop application I get the message: Excel cannot open the file "File name here" because the file format or file extension is not valid. Verify that the file is not corrupted and that the file extension matches the format of the file. The workbook should be 34KB in size and that 4KB file is not what I need??? Any ideas how to manage this, saving a workbook from a SharePoint / Teams file location to the computer so that we can run VBA code on it. GiGi80Views0likes3CommentsConditional Formatting multi rule help!
Hi all, I've asked a very similar question to this before, but the helpful answers I got previously now don't seem to work for my spreadsheet. Please could someone talk me through how do this: Below is a spreadsheet we use to tell us when a patients prescription has come into the clinic. We manually put this data in. I need a set of rules as follows if possible: If there is a date in the 'Date of Injection appointment' cell (in this case F13) and there isn't anything in the 'Prescription received in clinic' cell (in this case O13) then I would need the patient name cell (in this case D13) to turn a different colour depending how close the date of injection is. Does that make any sense?! So if the date of injection (F13) is less than 4 days from today and cell O13 is empty it needs to be filled red, if cell F13 is less than 6 days from today filled yellow and if cell F13 is more than 8 days from today then filled white. I'd really appreciate someone's help please. I'm losing my mind! Thank you in advance45Views0likes3CommentsCompile Error
I regularly create CPRs using Excel. This has always worked just fine, then the other day it suddenly stopped working and Excel gave me the following error message: "Compile error in hidden module: cpInterview. This error commonly occurs when code is incompatible with the version, platform, or architecture of this application. Click 'Help' for information on how to correct this error." I did click "Help" and a brief article popped up that did not help me resolve this issue. I don't understand why my report worked one day and then suddenly didn't work the next day. That makes no sense to me. I contacted Microsoft and they were completely useless, said this wasn't in their scope and there was nobody who could help me from their end. That also makes no sense to me since this is a Microsoft issue, but they told me to post in this online forum to try to seek help from other users. Does anybody know why this error suddenly happened and, more importantly, how to fix it??? I heavily rely on the CPR function to do my job and this is causing me a lot of hardship. I have Microsoft Office Home 2024 running on a Windows 11 HP Laptop. Thank you!36Views0likes2CommentsUtilizing Excel's turing capabilities to create Conway's 'Game of Life'
The Background It's been said with Lambda (and LET and a wealth of functions in 365) Excel has become 'turing-complete'. To quote the article linked below: "You can now, in principle, write any computation in the Excel formula language." https://www.microsoft.com/en-us/research/blog/lambda-the-ultimatae-excel-worksheet-function/ The Challenge I thought it would be fun to create Conway's 'Game of Life' in Excel 365 to see how far I could push things. Conway's Game of Life - Wikipedia The rules are simple: A 'cell' has up to 8 adjacent cells (less if the cell is on the edge of the board). A 'neighbor' is a cell with a 1 while a 'dead' cell is empty. An 18x18 board Multiple iterations Bigger boards! more (it's relaxing to create new shapes and designs) The Approach My first thought was to use MAKEARRAY because I could use 'r' and 'c' coordinates and there would be no stacking. I devised a recursive function that worked for 1 iteration but failed on subsequent iterations because the use of TAKE/DROP was slowly shrinking the board! The revised approach is essentialy a recursive MAP that uses 3 arrays: the input matrix, the 'r' array (row numbers) and the 'c' array (column numbers). It's my way of using r/c without using MAKEARRAY. For Discussion I welcome any improvements to the existing function and any different approaches someone may have to creating Conway's Game of Life. Conway Lambda follows: Conway =LAMBDA(matrix, iterations, IF( iterations = 0, matrix, Conway( LET( height, ROWS(matrix), width, COLUMNS(matrix), r_arr, SEQUENCE(height) * SEQUENCE(, width, 1, 0), c_arr, SEQUENCE(height, , 1, 0) * SEQUENCE(, width), CheckNeighbors, LAMBDA(lattice, r, c, LET( RCx, LAMBDA(row, col, IFERROR(CHOOSECOLS(CHOOSEROWS(matrix, row), col), 0) ), N, RCx(r - 1, c), NE, RCx(r - 1, c + 1), E, RCx(r, c + 1), SE, RCx(r + 1, c + 1), S, RCx(r + 1, c), SW, RCx(r + 1, c - 1), W, RCx(r, c - 1), NW, RCx(r - 1, c - 1), compass, VSTACK(N, NE, E, SE, S, SW, W, NW), neighbors, SUM(compass), IF( AND(lattice = 0, neighbors = 3), 1, IF( AND(lattice = 1, OR(neighbors = 2, neighbors = 3)), 1, 0 ) ) ) ), MAP(matrix, r_arr, c_arr, CheckNeighbors) ), iterations - 1 ) ) )3.1KViews3likes29CommentsAdd secure additional workbook and worksheet protection Use MS account
Instead make the workbook protection including locking cells and editing printing all the features associated with locking a workbook and worksheet away from a password. Instead have it linked to the Microsoft User Account and therefore the workbook or worksheet can only be edited by the creator when they are logged into their account and open the workbook. The current password way is not secure as we all know. If the formulas are encrypted (tied to our Microsoft account), then they never get decrypted on the end user’s machine, so there’s nothing for a hacker to inspect and steal. We would also need to lock or disable macros for untrusted users, VBa would also be hidden from those who are not logged into the creators MS account. This would greatly enhance the security of how office files are shared. The option to use the existing password system could still be selected as an option for those users who prefer it. But add this method of protection in there for those who really need it secure. No additional software would need to be installed or anything. No Azure rights management or anything. No Purview. These features simply dont let a user open the document unless they have rights. We want to share excel files with other users but restrict what they can do with them. Why using Microsoft Account would be more secure Password hashes wouldn’t live inside the file anymore (as they do with current sheet/workbook protection, which is why VBA can brute-force them quickly). Encryption keys could be tied to the user’s identity (e.g., your Microsoft account generates or retrieves a decryption key from Microsoft’s key service). Without that authenticated session, the file cannot be decrypted. Cloud-backed key management would allow revocation — if your account is disabled or you revoke access, the workbook becomes unreadable. Conditional access could apply (require MFA, only allow corporate devices, block risky sign-ins). All creator data is tied to MS account and therefore undetectable and locked to any who are not the creator of the locked document.27Views0likes1Comment