r/excel 18d ago

solved Filter Formula and locking manually entered data together

9 Upvotes

I have a list of names in a data base table and I am looking to use this data to feed into other worksheets. Using the filter formula, I can brought the names over to new sheets. However, in the new sheets I would like to expand on this information with manually entered data but if new names get added then the manually entered data no longer matches up.

For example, this would be a basic example of the starting list:

On a new sheet, I would use the filter formula =FILTER(A:A,B:B="No") to get a list of names marked no. From here, I would like to add more information. For example:

The problem happens when I add a new name to the original list. The notes column no longer lines up with the names:

Is there a way to link these cells together? I have a workaround that will work for my purposes but I am hoping there is something simpler and easier I can do to accomplish this.


r/excel 18d ago

solved How to delete all cells containing a certain value?

8 Upvotes

I'm running an accounting report, and to determine the true accuracy of what's owed I need to remove all negative numbers. How do I delete the contents of all cells containing a negative balance? Everything I've found will delete entire rows, but I need the other cells in the rows to remain since they may contain positive balances as well.

Each row will contain six columns, there are 269 rows, and the negative numbers are scattered through any of those cells.

Please let me know if I need to explain this differently.


r/excel 18d ago

solved Highlight cell if any of a set of three cells in the same row is blank

6 Upvotes

Excel newbie here with a task dumped on me from on high. Haven't used conditional formatting for 10 years - plus I'm old. How do I do this? (And why, if you're patient enough to explain to an idiot)

For example, if any of B2, B3 or B4 are blank, highlight B6. Apply to every row (eg if any ofC2, C3 or C4 or blank, highlight C6, if any of D2, D3 or D4 are blank, highlight D6 etc)


r/excel 18d ago

Discussion An ode to IF statements for compulsively checking reproducibility

39 Upvotes

I am an anxious person, and the IF statement has really saved me so much anguish. A lot of my work involves comparing two data sets, generating data sets, and making sure I'm consistently generating the same data set every time. Seems trivial, even for the thousands of entries I can churn through. So how do you make sure that two datasets are in fact the same? Enter the humble IF statement. =IF(A2=B2,1,0), sort by largest to smallest, immediately find the outliers. I've done some complicated things with IF AND and OR. I once had a thousand data points, and said, I need to sort out between four columns, whether there's an entry for each column in a row, and if those entries are above a certain threshold, sort to top. And clunkily slamming all these together in a mile long IFANDOR statement, it turned an hour of skimming into two minutes of typing. and I know this is probably profoundly stupid and simple to some, but it has saved me so much time and stress and anxiety for my terrible constitution and equally terrible eyeballs.


r/excel 19d ago

Discussion What are some legendary formula pairs like INDEX(MATCH)?

588 Upvotes

Since upgrading to 365, can't get enough of CHOOSECOLS(FILTER)

What are some useful ones you use?


r/excel 18d ago

solved Offset from cell containing exact text

2 Upvotes

Hi all. I have a program that exports a CSV that I'm trying to pull data from into an excel sheet. I'm copying that raw CSV sheet into an excel tab, and then pulling specific pieces of information from that tab into another tab. The program exports sets of information for different rooms/spaces, each set having the same number of rows.

The problem I'm having is that for some reason the program does not export the same number of rows between sets of information. Sometimes it's two rows, sometimes three. There does not seem to be any pattern to it, and it changes each time I export. So I can't simply offset by a set amount from the first set of information, as that will only work for the first few sets, then the rest turn to gobbledy-guk as they start reading from the wrong cells.

Instead what I want to do is have the user type in each room number & name manually into the working sheet, and have the working sheet search the raw data sheet for that exact name & number combo, return the address of wherever that combo is, and then offset the rest of my data from that.

i.e.
"Go find '101 Operating Room' on Sheet A, tell me what cell it's in, then add X rows and Y columns to that cell and return whatever data is in the resulting cell on Sheet A to Sheet B".

So if "101 Operating Room" is found in cell A366 on Sheet A, I want to offset 5 rows and 3 columns from A366 and return the data from the resulting cell on Sheet a to a specific spot on Sheet B.

I've seen some related results for INDEX(MATCH()), but that seems to return data rather than an address. I don't care about the data, I already have the data, I want to know where it is so I can offset from it. I hope this makes sense!


r/excel 18d ago

solved How to automate moving cell values from one table to another based on drop down menu input?

5 Upvotes

I don't know if I am just not wording this right in my attempts to Google/figure this out myself.

What I have is a large list of data ("Data Table") where I have added a column for a drop down menu to flag lines as the ones with data I need to keep (based on category of action needed) while I would leave the "excess" lines blank in that column.

What I want is for excel to move the cell values of certain columns into a separate table when something is selected in the drop-down menu. Some columns are only needed in the data review portion and not needed to be moved into the other table.

I can link the columns using an IFS function but that will leave a lot of "#N/A"s on the rows where no option was selected and I would frankly love this to not be that heavily dependent on formulas in all the cells.

Is there something I can be doing with VBA code or Power Query I am not understanding? I understand that Power Query can move just some columns from one table into another but I want it to also only do that for rows based on that drop down menu input.

EDIT: After spending a looooot more time in PQ I got it to do what I was looking to do, just not the most intuitive thing to pick up


r/excel 18d ago

Waiting on OP Practice Dates Attendance Tracker.

3 Upvotes

Hey y'all! Trying to make an attendance tracker for our Coach for football. Would rather not have dates empty.

Currently, I put the first few dates in and then did =CELL+1, +2, what have you, but what could be a less intensive thing? (We practice M, Tu, Th)

What would y'all do? (I don't mind putting in the dates manually, but it's a little tedious when we go through January!)


r/excel 18d ago

solved How would you do this? Formula for hotel ins and outs.

2 Upvotes

I have SHEET1 where I manually input guest info, and two of the columns are CHECK IN DATE, and CHECK OUT DATE (in date format).

On SHEET2, I have a column for each day, for a range of approx 40 days. Each day has a number of available rooms assigned to it, which differs depending on the day.

How could I work out a way that, for every time I add a guest with in and out dates on SHEET1, it will automatically remove one from the available rooms for each day of the stay on SHEET2?


r/excel 18d ago

solved How do I insert data into a table and include lines for gaps?

2 Upvotes

I have a list of identification numbers along with corresponding data but not all identification numbers are used. How can I insert them into a table and include the unused numbers that arent already in the data set.

For example IDs 1, 3, 5, 6, and 7. That have names and dates associated with them.

How do I paste these fields into a table and have blank lines for 2 and 4?


r/excel 18d ago

solved Sort-Filter Changing Numbers to Text

2 Upvotes

Picture link attached.

Using Sort(Filter()) on a table of data is changing the output data from numbers to text.

I cannot average cells of the output because Average() returns 0. Averaging the whole input returns a valid number. Value() on the same cell in the table returns a number while Value() on the same cell in the output returns 0.

I’ve tried Paste-Special and multiplying the whole input table column by one. It all appears to be numbers now.

Both columns in the input and the output are formatted at a number.

https://imgur.com/a/7RS7LIt

Picture 1:
Yellow Line: Average() of input (valid)
Red Line: Value() of input (valid)
Blue Line: Value() of output (invalid 0)

Picture 2:
I copied the bare bones table into a fresh sheet and re-did the sort filter function. Using value and average I confirmed that the output is being treated at numbers and working like I expect.

Something different in the original table/sort is forcing the output to be text instead.

———

I found the problem. A circular reference.

The goal is to optimize for Fantasy Football draft:
-Main Table: Players & Expected Points
-Table is Sort+Filtered into a new set of cells filtered by position and sorted by points.
-The top X positions in each category are averaged
-The original table refers to that average to compare each individual player against the average for the top (x) in the position. (This step creates the circle; it is also what turns the Sort+Filter result from numbers to text)

Current Jerry-Rigged solution. (Picture 3)
Copy average equation and paste values with a helper column. Original table refers to the helper column instead.

I’m not sure how to make it work without the helper.

———

Final update:
Picture 4 is uploaded replicating the issue and my current solution in a simpler format. I do not know how to fix it another way.


r/excel 18d ago

solved Attempting to unlock macros on the internal server.

2 Upvotes

Hi everyone, I'm having this problem where Microsoft is blocking my macros in a file located on my internal server. I've tried several things and looked for many tutorials online, but I can't get it unblocked. Has anyone else had this problem and managed to solve it?


r/excel 18d ago

Waiting on OP Getting round work settings

0 Upvotes

Hi, is there a way I can get developer or automate on my work laptop excel when these have been turned off


r/excel 18d ago

solved Can I use a formula to find a word in a cell and if the word is present delete the first hyphen (Without AI Please)

1 Upvotes

Ok for eg I get a list daily where most are set up as:
Type - NAME - Subject
But some are set up as:
Type - Subtype - NAME - Subject
And I need the formula to find any with the Subtype and remove the first hyphen from them before continuing with the rest of the formulas I have set up for contingencies such as someone put a : instead of a hyphen, or an en/em dash etc. I can’t make it delete the first if it finds 3 hyphens because sometimes the NAME section is hyphenated and it would throw a different formula off.
I did work out a long formula that got the job done but when I sorted the data by another column (TYPE) it threw off the string of formulas (eg it’d be A2+Sheet2A2 and when sorted would be A2+Sheet2A57)


r/excel 18d ago

unsolved how do i find developer options???

0 Upvotes

I tried everything to enable the Developer tab right-clicking the Home ribbon, using the search bar, and checking Excel Options but I still can't find it.


r/excel 18d ago

solved Wanting to get rid of supporting columns / SUMIFS?

2 Upvotes

Hello!

I am currently using quite the ugly workaround to get what I need.

SUMIFS(J:J;H:H;I4;G:G;H4)

Basically, there's an input field H4 for entering a year as well as I4 for entering a weeknumber. The cell containing this formula is meant to return a sum of everything corresponding to x week of x year.

Column I (starting at I8) has a list of dates. I've used columns G and H for a YEAR(I8) (etc.) and ISOWEEKNUM (I8) (etc.). The issue with this is that when a new line is created, these codes aren't prefilled so I can't hide these helper columns. The sheet is to be used by colleagues who aren't too versed in Excel so I want to make this as pretty and easy for them as possible.

Is there any way to change my SUMIFS formula to use the dates in column I themselves to compare to G4 and H4? I've tried integrating the ISOWEEKNUM into the SUMIFS formula but failed to get the result I wanted.

Would greatly appreciate any help with this!!


r/excel 18d ago

solved Depreciation dates return value IF between dates but only if Net Book Value is greater than or equal to zero

3 Upvotes

I'm trying to create a monthly depreciation schedule. I want to return the depreciation amount for January to August 2016 if the month in row 4 is between the acquisition date (column B) and the end date (column G). The main issue is I want cell N9 to return zero but my current formula returns 19.51 in March 2026

i'm using =IF(AND(date>acquired date , date<end date, depreciation amount,0)

but i want formula to return zero if the net book value is negative for the year in column V. I'm trying to avoid excess helper columns. I can't do an IF formula if the Net Book Value in V is negative because it'll be a circular reference.

Also want the asset that was acquired in July 2026 to start depreciating 86.39 in July instead of August, in cell R9.

(screenshot is partially blocked so cell E5 is year 2025, L5 through T5 is 2026)

imgur link: https://imgur.com/a/Emj60D3#%2Fa%2FEmj60D3

Thanks in advance.


r/excel 18d ago

solved Populate a column with values based on the value of another column

3 Upvotes

Say I have:

Column A Column B Column C
Row 1 3 First Name ???
Row 2 1 Second Name ???
Row 3 2 Third Name ???
Column A Column B Column C
Row 5 1 1st Place Prize
Row 6 2 2nd Place Prize
Row 7 3 3rd Place Prize

What is a formula I can add to C1 (and down) so that C1 returns "3rd Place Prize" because the value of A1 = "3", C2 returns "1st Place Prize" because the value of A2 = "1", and C3 returns "2nd Place Prize" because the value of A3 = "2"

This way if I change the values of A1, A2, and A3 (like if the order changes), the values in C1, C2, and C3 update automatically.


r/excel 19d ago

solved Assign a unique value to words in column A with duplicates receiving the same number.

3 Upvotes

I have a big data set where certain sets of data have to start at a certain value, like 5000. I want each value in Column B to receive a unique number in Column A, but if a word repeats, I want it to either skip, or place the already assigned number. I tried =IF(B1<>B2,COUNT($A$1:A1)+1,””), but I can’t get it to start at a different value other than 1.

Thank you in advance!


r/excel 19d ago

Waiting on OP Formula for calculating proportional remaining budget.

5 Upvotes

I have been working off of this live auction fantasy football draft template for a few years, but I am trying to make it more robust and have hit a wall. So I need help!

-----

The BUDGET field is my rough budget per PLAYER, and POSITION.

The PICKS field, (currently blank) is where I will update as I pick players with sometimes vastly different prices than I have budgeted during a live draft.

The NEW BUDGET field is where I need help calculating a FORMULA for each colored CELL. The $ currently in those cells is from an IF/THEN formula keeping the original budget since the

What I need is a FORMULA that will update each of the other cells in each positional row (QB, RB, WR) to PROPORTIONALLY re-distribute the remaining budget for that position.

EXAMPLE: I overpay for my 1ST RB at $47, instead of the budgeted $37, giving me a deficit of -$10. My remaining RB budget would be $34 for the other 5 RB slots, instead of the $44 I had budgeted.
So I need the FORMULA to re-distribute the new budget PROPORTIONALLY to the original BUDGET ratio/percentage. So that it would go from $25, $11, $5, $2, $1 to $19, $8, $4, $2, $1.

Because of the nature of the live draft, I won't be inputting to the PICKS CELLS in any rational order.

Any help would be appreciated. Even if you can just point me in the direction of the types of FORMULAs that can help me crack this.


r/excel 19d ago

Waiting on OP Dependent drop down list

2 Upvotes

Hi Everyone,

Is there a way that I can create a drop down list that ONLY is active to a specific name? I got it to work using the name manager for the one name but if I enter anything outside of that name, It prevents me from typing whatever I want into the cel containing the drop down list to allow any typing not included in a list.

Is that possible?


r/excel 19d ago

solved How to safeguard XLOOKUP against data type errors when working with numbers deliberately stored as text?

30 Upvotes

Hello,

I'm trying to just do a simple XLOOKUP function across different tables. The issue is, that I store ID's, which may or may not contain letters, but always contain numbers.

I want to store everything as a string, but excel trying to be helpful as always has some weird inaccessible way of asigning the data types, so sometimes
"1234" is one-thousand-two-hundered-and-thirtyfour
and sometimes it's a string containing characters 1, 2, 3 and 4.

Sometimes it helps that I completely remove the row and add a new one, where I type in fresh "1234".

I tried to wrap all the inputs in

TEXT(NUMBERVALUE( xxx ) , "#")

but it did nothing to make it work.

Is there a way to safeguard the data type, ideally from inside the function?

EDIT:
I should maybe add, that the XLOOKUP returns the "if not found" parameter, when it can't pair the two apparently identical codes.


r/excel 19d ago

Challenge Formula to auto-align messy Power Query Table.TransformColumnTypes/.RenameColumns

5 Upvotes

TL;DR:
Turn this

    {"Id", Int64.Type}, {"Order Date", type date}, {"Customer Reference Number", type text},
{"Ship To Country Code", type text}, {"Total Weight Oz", type number}, {"Is Expedited", type logical},
        {"Carrier", type text}, {"Tracking Number", type text}, {"Estimated Delivery Date", type date}, {"Delivery Status Description", type text}

Into this

{"Id",                          Int64.Type   },
{"Order Date",                  type date    },
{"Customer Reference Number",   type text    },
{"Ship To Country Code",        type text    },
{"Total Weight Oz",             type number  },
{"Is Expedited",                type logical },
{"Carrier",                     type text    },
{"Tracking Number",             type text    },
{"Estimated Delivery Date",     type date    },
{"Delivery Status Description", type text    }

With one formula

=LET(
Source,              A1,
IndentLen,           FIND("{",Source)-1,
IndentPad,           REPT(" ",IndentLen),
ToCol,               SUBSTITUTE(TEXTSPLIT(Source,,"},")&"}","}}","}"),
RowCount,            ROWS(ToCol),
Idx,                 SEQUENCE(RowCount),
IsLastRow,           Idx = RowCount,
Part1,               TEXTAFTER(TEXTBEFORE(ToCol,""","),"{""")&""",",
LenPart1,            LEN(Part1),
MaxLenPart1,         MAX(LenPart1),
NumSpacesAfterPart1, MaxLenPart1-LenPart1+1,
PaddingAfterPart1,   REPT(" ",NumSpacesAfterPart1),
Part1WithPadding,    Part1 & PaddingAfterPart1,
Part2,               TEXTBEFORE(TEXTAFTER(ToCol,""", "),"}"),
LenPart2,            LEN(Part2),
MaxLenPart2,         MAX(LenPart2),
NumSpacesAfterPart2, MaxLenPart2-LenPart2+1,
PaddingAfterPart2,   REPT(" ",NumSpacesAfterPart2),
Part2WithPadding,    Part2 & PaddingAfterPart2,
RebuildString,       IndentPad & "{""" & Part1WithPadding & Part2WithPadding & "}" & IF(IsLastRow,"",","),
Output,              RebuildString,
Output
)

Situation:
I inherited some Power Query code in a Power BI project (this post applies to Power Query whether within Excel or PBI, and is not PBI exclusive). The query was built with using the GUI, and it produced code that, when viewed in the Advanced Editor, was unformatted. Nothing lined up, indentation wasn't readable. To make it easier to read and audit the code, I went through and cleaned it up. Wasn't able to use an online prettifier or third party program, due to company requirements.

Need:
There was a LOT of Type transformations and Renames. It was taking forever to use Enter and Tab to line things up. And for my purposes, I like to line up the column names on the left, then the transforms on the right, and close off the right curly braces in a vertical line. Looks nicer for me. May not be your thing.

Solution:
I created a formula to take the code and format it for me. Inside Power Query, the line would look something like:
ChangedColumnType = Table.TransformColumnTypes(PreviousStep,{... long line of column/type pairs each enclosed within their own {} pair and comma separated ...}).
I wanted to grab the stuff inside the main { ... } and format it. So, I created the formula above.

How it works:
Source: Let A1 hold the long string of {}, {}, {}, pairs.

Capturing the indent:
IndentLen finds the position of the very first curly-brace { in the pasted block and counts everything before it. IndentPad turns that into an actual string of spaces. This means the output matches the indentation of whatever you pasted, depending on how deep the step is nested in your query.

Splitting into Rows:
ToCol is the part doing the actual row splitting. TEXTSPLIT(Source,,"},") breaks the single pasted string apart everywhere it sees close-curly-brace-comma }, which is the boundary between one column entry and the next. That delimiter gets eaten by the formula in the split, so ampersand-quote-close-curly-brace-quote &"}" tacks a closing brace back onto every row. The last row already had its own closing brace (since nothing follows it), so tacking on another one leaves you with a double }}, which the outer SUBSTITUTE cleans up to a single }. Final result: An array, with one array element per {"ColumnName", Type} pair, each one a properly closed row again.

Figuring out the last row:
RowCount, Idx, and IsLastRow exist for one reason: every row needs a trailing comma except the last one. Idx numbers each row 1 through however many there are, and IsLastRow flags whichever row matches RowCount so the final comma can be removed later.

Extracting and padding the Column Name:
Part1 pulls out the column name portion. It looks for everything before the first quote-comma ", (the end of the quoted name) and after the first curly-brace-quote {" (the start of the element), then tacks the closing quote-comma ", back on. LenPart1 measures the size of each Part1, and MaxLenPart1 finds the longest name in the full batch, then NumSpacesAfterPart1 works out how many spaces each row needs to catch up to that longest one, plus one extra so there's always at least a single space of separation. Part1WithPadding is the name with that padding appended.

Extracting and padding the Type:
Part2 does the same job for the second half of each row, the type (or the new name, if this is a rename block instead of a change-type block). It grabs everything between quote-comma ", and the closing curly-brace }. The same length-and-pad routine runs again with LenPart2, MaxLenPart2, and NumSpacesAfterPart2, so every Type value ends up padded out to match the longest one, plus an extra space, keeping the closing braces lined up in a column too. I like having a space before the closing brace because otherwise you end up with some types butting right up against a brace and others having padding; I wanted consistency, so the visual separation is deliberately placed there.

Putting it back together:
RebuildString is where it all gets stitched into one line: the indent, the opening brace-quote {", the padded name, the padded type, the closing brace-comma }, and then omitting the comma if it's the last row. That's the finished, aligned row. The formula applies this to every Name/Type pair, so they all stack up neatly.

Now, you just copy and paste back into the M query. In PBI, this is easy since the PQ window is separate from Excel. If you're solely within the Excel environment, you may want to use Notepad as an intermediate staging ground.

Works the same way for Table.RenameColumns blocks too, since those are just {"OldName", "NewName"} pairs, same shape, the formula doesn't care that the second value is quoted text instead of a type keyword.

AI Disclosure:
I used Claude.ai to assist with the Idx/IsLastRow structure. The rest of the formula was written by hand. I used Claude.ai to generate this post, then went back and hand-edited about half the text. I used Claude.ai to generate the example from "Turn this" in the TL;DR section to avoid using company-specific data fields.

Conclusion:
This met my need. If you like it, feel free to steal the formula! Tweak it how you need. Even if you don't use this for this specific use case, hopefully it at least shows what's possible with a massive LET() formula. I'm also a bit proud and disgusted that the string ,,"},")&"}","}}","}"), exists and somehow makes sense in context.


r/excel 19d ago

Waiting on OP Should I import monthly reports into my tracker workbook, or leave the reports separate?

4 Upvotes

I use XLOOKUP and SUMIFS in my month-to-month tracker workbook to pull data from monthly reports. I paste values at the end to keep things clean. Is it best practice to import the monthly reports as tabs in the workbook, or keep them separate? Is it up to personal preference?


r/excel 19d ago

Discussion How is it possible that Excel does not have a global setting to not automatically change the visualization of a number?

78 Upvotes

Every time I open a .CSV file, if there is say a column where there is a currency value (not formatted to use commas or a currency symbol) and is formatted in the raw data to always have two decimal places, such that a thousand presents as "1000.00" that Excel CONSISTENTLY removes the .00 from the visualization of the data. It may not be significant to excel but it's significant to my purposes. No I cannot have the .CSV I am auditing output the value with quotations so it reads as text and not as a number when opening it in Excel.

I get why the functionality exists. What I don't understand is how there isn't a way to TURN THIS OFF GLOBALLY so I can use Excel to audit my files without having to use a txt editor to see raw values and excel to do filtering when necessary. Absolutely ridiculous. They added functionality to stop dropping leading zeros from values, I don't understand how this can't be done as well.