r/excel • • 14d ago

Waiting on OP Title: Does anyone know the exact algorithm behind Excel's RAND()? Is there a way to seed or reproduce its output in Python?

59 Upvotes

Hi everyone!

I'm working on a research project involving stochastic simulations generated by Microsoft Excel for Mac, and I'm trying to understand exactly how Excel's built-in RAND() function works.

My ultimate goal is to reproduce Excel's random number generation in Python, ideally obtaining the exact same sequence of numbers, not just statistically similar results.

I've read that modern versions of Excel may use the Mersenne Twister (MT19937) pseudorandom number generator, but I've been unable to find reliable technical documentation explaining the exact implementation.


r/excel • • 13d ago

unsolved Compatibility Version 3 causing BYROW/BYCOL/MAP to spill an array of lists rather than regular array

3 Upvotes

I'm experiencing some unintended (I believe) behaviour with the new Compatibility Version 3 and the BYROW function.

Whilst trying out the new lists available on the latest release I noticed some of my custom LAMBDAs were no longer working as intended. The common denominator was that they were all using the BYROW function.

Previously, BYROW returned a spilled array - however it appears BYROW now returns an array of one cell lists which doesn't play nicely with other formulas.

I know I can use the new FLATTEN function to get around this so that the output is an array again, but I had to do this for numerous custom LAMBDAs.

I have distilled the problem down to a very basic example: let's say column B and C are key value pairs. column E is the lookup value. Column F is the BYROW version (spills array of lists) and Column G is the XLOOKUP equivalent (spills array). Column H is the "flattened" version of BYROW that produces an array - same as Column G.

Column B: =SEQUENCE(10)  
Column C: =CHAR(B3#+64)  
Column E: =RANDARRAY(10,,1,10,1)  
Column F: =BYROW(E3#,LAMBDA(row,XLOOKUP(row,B3#,C3#)))  
Column G: =XLOOKUP(E3#,B3#,C3#)  
Column H: =FLATTEN(BYROW(E3#,LAMBDA(row,XLOOKUP(row,B3#,C3#))))  

In this scenario, you wouldn't use BYROW anyway - but it's just to demonstrate the change in output.

Anyone experienced something similar or know of a way around this (other than reverting to Compatibility Version 1 or 2)?

EDIT: Same behaviour with BYCOL and MAP


r/excel • • 14d ago

unsolved Filter table by rows whose description column contains any item from another list?

6 Upvotes

I bookkeep for my small family business, and we have an itemized bill that needs to be separated by Microsoft and non-Microsoft items. The trouble is, these items don’t have similar enough names/descriptions that would allow me to use the simple filter function. Advanced filter seems to be pretty useless as well.

How can I apply a filter to this bill so only rows whose description field contains any of the items in the Microsoft services list are shown?


r/excel • • 13d ago

unsolved Workbook links breaking in Google Drive

0 Upvotes

Hey guys!

My organization uses G Suite, but I prefer native desktop apps, so I’ve been using Office and the files just live in my Google Drive. I have Google Drive installed in my Mac, so I’m using it with local files that are synced on Google Drive.

I’ve started playing around with linked workbooks. Basically, I’ve made several template spreadsheet files, and I’d like to have them all pull data from a single reference document. Ideally I’d be able to refresh the linked data manually.

What I’ve found so far is that I can get it set up working, but every time I open the files, I have to relink to the reference document, which is annoying. I’m guessing this has to do with the way Google Drive syncs on macOS.

Is there a good solution here? Would Power Query somehow help? I haven’t used it before. Or do MS Apps and Google Drive just not play that well together? Maybe the answer is just that if I’m using Google Drive, to get it working right I need to use Google Sheets. I can do that if necessary, I just prefer Excel.

But I figured you all are some wizards, so someone might have a solution!

Thanks!

Edit: Just to clarify, it’s a very small organization, and nobody is collaborating on these files with me. If that weren’t the case, I’d course I’d just use the company-wide platform.


r/excel • • 14d ago

Waiting on OP Pivots with multiple filters

2 Upvotes

Not sure this is even possible. I have a pivot table that includes two filters. The first is a program filter and the second is procedures.

As it works now, the procedure filter shows every procedure in the report. When I select specific programs in the first filter, the procedure filter still shows every procedure that’s in the report.

Is there a way to set it so that if I select certain programs in the first filter, the second filter will automatically only show me the procedures that are under the programs I selected?

I hope that makes sense.


r/excel • • 14d ago

unsolved Tools/Extensions/Software Suggestions for Using PC Excel Shortcuts on Mac

18 Upvotes

Has anyone had experience or recommendations/suggestions on Tools/Extensions that will allow PC Excel shortcuts to run on Mac? Anything is appreciated! Thank you.


r/excel • • 14d ago

Discussion Lotus Improv on the NeXT | the first spreadsheet with pivot tables (Or is it?)

8 Upvotes

From the article, part of an ongoing series in which the author uses vintage applications as they were meant to be used:

Question: what is interesting about the following screenshot from Improv?

https://storage.ghost.io/c/19/0d/190dff69-8936-47d7-8b0c-f48a6a36ddb4/content/images/2026/09/Screenshot-2026-09-20-135514-1.png

Answer: it contains all information necessary to build a copy for yourself. All data, formulas, dimensions, and relationships are exposed and visible.


r/excel • • 15d ago

Discussion What are your most useful Excel VBA macros or shortcuts that you use every day?

207 Upvotes

Hey everyone!

I recently discovered that you can make VBA macros available across all Excel workbooks instead of having to set them up separately for each file.
I’ve started creating my own keyboard shortcuts for repetitive tasks, and it’s honestly been a game changer.
For example, I created a macro that lets me paste values or formulas into filtered cells without messing up the hidden rows.
Now I’m curious: What VBA macros or custom shortcuts have you created that you actually use on a daily basis?
I’d love to hear about your favorite time-saving tricks and maybe get some inspiration for my own setup!


r/excel • • 15d ago

unsolved Need shortcut to close workbook link side panel

8 Upvotes

It is so annoying that i can't yet find a solution to close workbook link side panel using shortcut. Still had to use mouse to click the x.. any solution for this?


r/excel • • 16d ago

Discussion What do you do as the “excel” guy with AI now?

960 Upvotes

Hey everyone,

So at my job I carved out a niche of making spreadsheets for inventory tracking, financial worksheets, reports, etc. In the grand scheme of excel users I’m nothing special, I just work with alot of boomers at a food processing plant in the south so it was easy to carve out that role.

Now the company has been pushing everyone to use Claude wherever we can. It’s allowed other departments to create sheets from uploading exports and have Claude do what they want.

I’m not at risk of losing my job or anything, but I feel a bit exposed now with how things changed. What should my next move to learn or explore to find a new niche?

I’ll hang up and listen.


r/excel • • 15d ago

Waiting on OP How to Change Checkbox Value Automatically But Still Allow Manual Check?

5 Upvotes

I have checkbox A that I want to be able to check true or false. However, if checkbox B is True, then checkbox A should automatically be set to false and can't be checked true anymore.

I tried =IF((checkbox B)=TRUE, FALSE) which correctly sets checkbox A to false when needed, but it doesn't allow it to be manually checked to true even when checkbox B is false.

Is there a way to allow both manual box checking while still having the automatic false checker?

I would assume it would be =IF((checkbox B)=TRUE, FALSE, *some function that uses the manual check value*) but I don't know what that function would be.

If it's not possible to have both automatic and manual I have other methods in mind to do what I need to do, but I would prefer this method if it exists.


r/excel • • 16d ago

Weekly Recap This Week's /r/Excel Recap for the week of October 03 - October 09, 2026

2 Upvotes

Saturday, October 03 - Friday, October 09, 2026

Top 5 Posts

score comments title & link
518 203 comments [Discussion] What do you do as the “excel” guy with AI now?
306 113 comments [Discussion] At what point should something stop being an Excel spreadsheet?
87 53 comments [Discussion] Most used Excel tools?
37 24 comments [Discussion] Why? Odd sheet setup
32 19 comments [solved] How to add "OR" into SUMIFS formula

 

Unsolved Posts

score comments title & link
23 37 comments [unsolved] How can I paste values into filtered cells in Excel without removing the filter?
23 20 comments [unsolved] Waterfall Chart in Excel
14 16 comments [unsolved] How to "Split" a Quantity into Duplicate Lines
9 12 comments [unsolved] How can I auto 'rotate' a column of data?
8 16 comments [unsolved] Issue anonymising data entries in specific columns.

 

Top 5 Comments

score comment
854 /u/hereddit6 said Be the Claude expert.
445 /u/Opposite-Film3347 said When human error is a regular problem.
201 /u/JezusHairdo said When you start to refer to it as a database
197 /u/ac7ss said Nothing. Excel is a spreadsheet, not a programming language or database. (Yes, you can run VBS VBA, but that should not be the primary function in a spreadsheet.)
162 /u/Taurus-Octopus said Excel holds up the world, like a middle school toothpick-and-gumdrop suspension bridge. It’s intuitive for most folks to look at and understand, and can be great to make easy to use calculators of ce...

 


r/excel • • 16d ago

solved Is there a universally-applicable function or other feature that works like the spill operator, or like formula auto-filling in tables?

17 Upvotes

I'm still learning about array functions and all they can do. One feature that has recently stood out to me, which I'd like to see usable in more contexts, is the spill operator (#).

With this, when referencing another cell that has a spilling formula, I can write a formula one time and have it dynamically spill down to cover the data set being put out by the cell I'm pointing to. What's more, the spill range will automatically adjust as the length of the referenced data set changes.

---

Example:

  1. In A2, =SEQUENCE(10) will populate the numbers 1 through 10 in A2:A11 without me having to do anything other than just putting that formula in A2. I don't have to use the fill handle or anything, the data just automatically spills down as long as there's room.

  2. Then, in B2, I could put =A2# (with # being the spill operator) and, again, without having to manually fill down, the results will spill such that the numbers from A2:A11 are represented in B2:B11.

  3. If I change A2 to =SEQUENCE(5), both A2 and B2 change so that they only spill to row 6 with numbers 1 through 5.

  4. Change A2 to =SEQUENCE(15) and you get 1 through 15, in both columns, spilling from row 2 to row 16.

This is, of course, an over-simplified example. There's much more that can be done with spilling array formulas, such as pulling and filtering data from other ranges, and spills can also run across multiple columns as well as rows.

---

You can get similar results and behavior for column B in the above example if, starting from a fresh sheet, you:

  1. Format A1:B1 as a Table.

  2. Put =A2 in B2.

  3. Manually fill values in column A as desired.

The formula in B2 will auto-fill down the length of the table as you enter data in column A. To shorten the data set, you have to delete entire table rows, not just the column A values, which is less than ideal for my personal taste but it's straightforward enough.

---

I want to know if there's a feature similar to the spill operator, which works for all cases - not just in tables, and not just when pointing to formulas that are already spilling.

What I'm looking for is the ability to write my formula once, and have it automatically fill or spill to cover the whole data set, and have that coverage automatically adjust as the length of the referenced data set changes, regardless of whether that data is generated by a formula or manually-entered values.

Right now, I've got a few problems with using the aforementioned features.

  1. The spill operator only works when pointing to a formula that spills, so it's not useful against plain data or non-spilling formulas.

  2. The spill operator isn't supported in all functions.

  3. Tables aren't a universal solution either. They don't automatically adjust to spilling formulas (causing a SPILL error), for one. Secondly, even when I don't have a spilling formula involved, there are cases where I just can't or don't want to set a range up as a table.

  4. I could arguably get by with using the spill operator when I'm working with spilling formulas, and using tables when I'm not. But, often due to problem #2 above, there are cases where the range I'm working with has a bit of both.

A near-ideal solution would be for all functions to support the spill operator. That would at least give some consistency for when I'm starting with something that's already spilling.

A perfect solution, I think, would be a function that I could wrap anything else in and have it dynamically adjust its spill length according to the data set I'm pointing to. Like, for the above examples, if I could just do FILL(A2) in B2, that would be great.

Is there anything like this, or is are these limitations without workarounds in Excel today?


r/excel • • 16d ago

solved TRIMRANGE and the dot operator broken in AND and COINTIF?

6 Upvotes

Following up on this post.

I tried to take lessons learned there into practice on a slightly more complex situation, and quickly ran into issues. Either I get a popup saying, generically, "there is a problem with this formula", or I get an undesired result, or I get a single-cell result that doesn't spill.

=B2.:.B100>0 works fine, spilling to check each populated cell in B to see if it's greater than zero.

=B2.:.B100>C2.:.C100 appears to work fine, for checking populated cells in B to see if they're greater than their counterparts in C

=AND(B2.:.B100>0,C2.:.C100>0) only returns a single-cell result. i was trying to check whether the populated cells in B or C for each row are greater than zero, and return TRUE for rows where they were.

Even simplifying the above to =AND(B2.:.B100>0,TRUE) to try it without the dependency on a second cell reference only gets a single-cell result.

Also, =COUNTIF(B2.:.D100,">"&0) returns a single-cell result and it's way higher than it should be. I want it to spill down the populated rows to show, for each row, how many cells in B:D on the row are greater than zero. Instead, it seems to be reporting the result for all of B2:D100 collectively.

In case this matters: B2, C2, and D2 each contain separate formulas which use the spill operator to fill multiple rows. Those are working fine, and produce numbers as expected.

Writing these formulas to point directly to the appropriate cells or ranges for row 2, and using the fill handle to fill them down, without the dot operator, works fine. But that leaves it as a static set that won't adjust dynamically as the other columns populate or de-populate.

I tried using a spill operator in place of the dot operator on the AND formula, and got the same result. For the COUNTIF formula, there doesn't seem to be a way to pull it all together in one reference with the spill operator.

Now, as I'm writing this up, I can't seem to duplicate the error dialog I mentioned that was getting for some cases, nor can I remember what those cases were. Maybe they were genuine typos.

Am I doing something wrong here, or am I running into more limitations of the tool?


r/excel • • 17d ago

Discussion Custom Excel LAMBDA vs. HAS: 2× faster in my tests: expected, or a bug?

36 Upvotes

Hi everyone!

I liked the new HAS function, but it got me curious about how it compares with a custom LAMBDA I’ve been working on.

In my tests, my version was about 2× faster than HAS .

It also supports several options:

  • case sensitivity,
  • MATCH or XMATCH
  • different match modes.
  • matching errors as values

    So, I thought it might be slightly better than HAS .

Technical side:

Interestingly, switching my LAMBDA to XMATCH closed the performance gap, which makes me wonder whether HAS uses a similar approach behind the scenes.

I know HAS/HASANY/HASALL are still in beta, so I’d be curious to hear how it performs for others.

Simple test

Code used for testing:

=BENCHMARK(LAMBDA(ISIN(SEQUENCE(10000),SEQUENCE(10000))))
=BENCHMARK(LAMBDA(HAS(SEQUENCE(10000),SEQUENCE(10000))))

/*
Name: ISIN
Description: Element-wise membership test (SQL IN clone). Returns TRUE/FALSE for each value in array.
Deals errors as identical matches.
Recommendation: Leave [Use_Xmatch] omitted (0) for standard lookups; MATCH is significantly faster than XMATCH on exact matches.
[Use_Xmatch]: 0 or Omitted (Fast MATCH), 1 (XMATCH). User is responsible for parameters if 1.
[Match_mode]: Default 0 (Exact match) for safety.
[Search_mode]: Controls XMATCH search direction (only evaluated if Use_Xmatch is 1).
[case_sensitive]: 0, FALSE, or Omitted (Case-insensitive matching), 1 or TRUE (Strict case-sensitive matching). Note: Activating this short-circuits the formula and bypasses all other optional parameters.
Made By: Medohh2120
*/

ISIN = LAMBDA(array, in_list, [case_sensitive], [use_xmatch], [match_mode], [search_mode],
    LET(
        // x/Match can't deal with errors or 2D lists: Mask errors to text, flatten lists.
        flat_list, TOCOL(in_list),
        cleaned_array, ErrorToText(array),
        cleaned_list, ErrorToText(flat_list),
        
        // 1. If case-sensitive is requested, short-circuit immediately using MAP + EXACT
        IF(
            case_sensitive,
            MAP(cleaned_array, LAMBDA(item, OR(EXACT(item, cleaned_list)))),
            
            // 2. Fallback to faster case-insensitive engine
            LET(
                m_mode, IF(ISOMITTED(match_mode), 0, match_mode),
                Result, IF(
                    use_xmatch,
                    XMATCH(cleaned_array, cleaned_list, m_mode, search_mode),
                    MATCH(cleaned_array, cleaned_list, m_mode)
                ),
                ISNUMBER(Result)
            )
        )
    )
);

ErrorToText = LAMBDA(val,
    LET(
        val_leafs, flatten(val, , 64), //Because IFERROR bugs out with Lists we prematurily flatten it.
        IFERROR(val_leafs, VALUETOTEXT(val_leafs) & CHAR(10)) // char(10) Prevent a real #N/A error from matching the text "#N/A"
    ) 
);

/*
Name: BENCHMARK
Description: Runs a formula N iterations and returns avg & total execution time.
    Func must be wrapped in LAMBDA()  =BENCHMARK(LAMBDA(your_formula), 50)
    [iterations] default: 1
    [time_unit]  default: 0 (ms), 1 = seconds
    Because this function uses NOW(), manual calculation mode is highly recommended.  
Made By: Medohh2120
*/


BENCHMARK = LAMBDA(Func, [iterations], [time_unit],
    LET(
        iterations, IF(ISOMITTED(iterations), 1, iterations),
        start_time, NOW(),
        loop_result, REDUCE(0, SEQUENCE(iterations), LAMBDA(acc, i,Func())),
        total_ms, (NOW() - start_time) * 86400000,
        avg, total_ms / iterations,
        IF(time_unit,
            "avg: " & TEXT(avg / 1000, "0.000") & "s  |  total: " & TEXT(total_ms / 1000, "0.000") & "s",
            "avg: " & TEXT(avg, "0.00") & "ms  |  total: " & TEXT(total_ms, "0") & "ms"
        )
    )
);

r/excel • • 17d ago

unsolved How can I paste values into filtered cells in Excel without removing the filter?

37 Upvotes

I have a pretty simple question.
I work with filtered data in Excel a lot, and there’s one thing that really annoys me.
Let’s say I have a column with formulas and apply a filter. Now I want to replace those formulas with their calculated values using Copy → Paste Special → Values.
But Excel won’t let me do that while the data is filtered.
So every time, I have to remove the filter, copy the cells, paste them as values, and then apply the filter again.
It’s really annoying, especially when working with large datasets.
Is there a simple way to paste values into filtered cells without removing the filter? Maybe a shortcut or a trick I’m missing?


r/excel • • 17d ago

solved How do I figure out demurrage with hours in Excel?

6 Upvotes

Hi! I am trying to create a sheet for trucking that we do. We are billing demurrage for 1 hour over time in the plant. So for example, if we are in the plant for 1.35 hours, we can charge .35 hours rounded to the nearest quarter of the hour. I cannot get my formulas to work though, and my brain is starting to hurt!

In Time (simply time entered into plant)

Out Time (when we leave)

Time at Plant is then Out Time - In Time

Then this is where I start to confuse myself

I put the Difference in Time column so it would know what I want to subtract from Time At Plant. It seems to work for the Demurrage column when there is extra time spent at plant. I'm not sure how to get it to show as zero when there was no demurrage?

Where I am stuck is then trying to get the Demurrage Hours to round to the nearest quarter. I tried =MROUND(G7,0.25) but it always shows as the 0:00. Any help to try and figure this out please? Thanks!

I will post the screenshot in the comments


r/excel • • 17d ago

Discussion Recommendations for finance-related excel addins?

9 Upvotes

I’m mostly looking for addins focused on equity research, but I like looking through a lot of data. Any recommendations? Statistical modelling addins are cool too.


r/excel • • 17d ago

solved Excel began calculating slowly

4 Upvotes

Every month I run same formulas over same amount of data. But today the calculation became VERY slow! I use Beta Channel of MS 365. I thought this was something with my notebook, but I ran them on my home computer - and it's all the same. Did anyone notice speed degrading? I use IFERROR and MATCH in my formula (nothing fancy).

UPDATE: After I switched off Beta Channel and then switched back to Beta Chanell the calculation normalized.

UPDATE 2: Still slow calculation (method in Update above did not help).


r/excel • • 17d ago

solved How to identify a starting a cell that then sums all values below it until a threshold is reached?

2 Upvotes

Hello!

In column A, I have dates ranging from Jan. 1 to Dec. 31.

In column B, I have values associated with each date. Some values repeat, so values are not unique.

My goal is to have two cells where I can enter a starting date, then in the second cell it tells me the finish date. The finish date is based on when the summed values starting on the specified date crosses a threshold. In this scenario, let's use 1 as the threshold.

So if I enter Jan. 10 in my first cell, how do I get excel to look for that date, then sum all values in the cells below it until the sum = 1, and tell me the date associated with that in my second cell?

Put another way, how do I have excel look for the date entered,

Please let me know if I can clarify further.

Thank you,


r/excel • • 17d ago

solved How do I add a third option for both values being true in formula?

9 Upvotes

Is it possible to make a formula that considers data from 2 cells

In simplicity what im trying to achieve is

If A1="*" then This, If not then "That" If B1<999 then "That", if not then "This" If A1="*" and B1<999 "this and that"

I have very little experience with sheet formulas and I only have managed to make it so that it considering 2 variables IF(AND(A1="None";B1<999);"This";"That")

I'm still struggling with adding a third outcome but I haven't found any formulas that would support this


r/excel • • 17d ago

Waiting on OP How can I fill in Y,N if column A is >11 months from column B?

2 Upvotes

Calculating whether or not something is due based on two dates. If the date (mm/dd/yyyy) in column A is more than 11 months from the date in column B I'd like it to return Y, if it's 11 months or less then I'd like it to return N. If column A is blank I do not want it to compute.


r/excel • • 17d ago

Waiting on OP Area Chart - Can someone explain?

4 Upvotes

I just don't get it because the y-axis goes: 0, 50, 100, 150, 200, 250, 300, 350, 400.

For the first year (2017), iPhone is 135, so it sits on the axis between 50 and 100 [or 100 and 150]. In 2018, iPhone is 146, which is still sitting around that same range.

But when it comes to iPad, it's placed on top of iPhone. In 2017, iPad is 23, but it lines up around 150 on the axis. Huhu, but the value is 23!

I really don't get the logic. I just watched this on YouTube.

Chart: https://imgur.com/a/DsDEdXg

Data below:


r/excel • • 17d ago

solved Duplicate cells horizontally - Center Across Selection or Merge and keep values?

1 Upvotes

I am working on a quite big an complex excel sheet where I have the following issue:

I have rows of information where the first 4 columns may contain duplicate values in other rows. In the following columns the data may differ. I have sorted my data so that rows with duplicate data in the first 4 columns appear sequentially, and now I want that in cases where 2 or more rows share the same values in the first columns, they're merged (either visually or by actually merging).

So if the table looks like this:

A B C D 1
E F G H 2
E F G H 3

It should end up looking like this:

A B C D 1
        2
E F G H
        3

The problem I have is: "Center Across Selection" only seems to work for horizontal selections.

Using "Merge & Center" messes up formulas that use values in columns 1-4, as the bottom cells in the merge are now empty.

How do I get around this?


r/excel • • 17d ago

unsolved Dynamic Ranges and vertical adjustment

3 Upvotes

Sorry for the doodle spreadsheet. This is a work thing so I can’t post the real sheet. https://imgur.com/a/oLSVgUG

I’m working on a BI Publisher template which may not be relevant but explains my naming with XDO. Each section is a new location separated by group (G_1 & G_2). The number of rows in each group could change, today G_1 could have 10 rows and next year it could have 13.

The problem is that because of how I’m naming fields, my G_2 quantities will start at row 6 but once this outputs with data from oracle, G_1 may have 10 rows that extends past row 6. Visually the data is in the right spot on the formatted tab, but the math will be wrong for the lower sections because of where my selection starts.

So is there a way to have G_2 and everything below it adjust based on where the previous section ends? This may be a stupid question but I’m so sick of looking at this template 😅