Forum Discussion
hjameelq
Sep 22, 2021Copper Contributor
Adding a formula to a column and make it auto-repetitive and deactivate the column
Hi Guys, I want to add a formula to the column to the first cell, and then to be repeated for each new row, knowing that I want to disable this column because it is calculated and I do not want the ...
Juliano-Petrukio
Sep 22, 2021Bronze Contributor
If you want to lock the column reference you just need to put dollar sign before the column $
=FORMULA($A2)
If you want to lock the Row reference you just need to put dollar sign before the row $
=FORMULA(A$2)
If you want lock both just put dollar sign on both
=FORMULA($A$2)
=FORMULA($A2)
If you want to lock the Row reference you just need to put dollar sign before the row $
=FORMULA(A$2)
If you want lock both just put dollar sign on both
=FORMULA($A$2)
hjameelq
Sep 22, 2021Copper Contributor
But I will have to drag it myself, it will not repeat itself and I do not how many records we might have...
- tabsJan 15, 2025Copper Contributor
Did you ever get an answer to your question? This is exactly what i'm looking to do, and every article i find either says drag, or double click. I just want the entire column filled to ∞, except for the title.
- Pegi CJan 15, 2025Copper Contributor
I am so sorry that was a problem I had at the time, I did get a result but cannot remember what it is now. I was working with files for a non-profit and no longer have access to the formula. It did work perfectly though.
- Juliano-PetrukioSep 22, 2021Bronze Contributor
Find a gif with some ideas using the https://support.microsoft.com/en-au/office/display-or-hide-the-fill-handle-80918200-9ae9-4615-93c9-13d4f1496f81 feature.
- hjameelqSep 22, 2021Copper ContributorThat is not what I want at all 🙂
- mtarlerSep 22, 2021Silver ContributorIf you set that section us as a table then the formula will fill the entire column and as new rows of the table are added it will add the formula accordingly.
Alternatively, using dynamic arrays you can set up the formula to process on all the data. so in B1 you can use =A:A to copy all data in column A to column B. Of course the formula can get much more complicated and instead of referring to the entire column A:A you can refer to only the range that has data using something like OFFSET(A1,0,0,COUNTA(A:A)) and that could be used in a LET() statement in the cell or defined as a Name for the worksheet.- hjameelqSep 22, 2021Copper ContributorI need to add a formula to a column and make it disabled, not a data validation. A formula on the column and I want it to calculate the values in disable mode as I do not want users to change or enter anything there.
- mtarlerSep 22, 2021Silver ContributorI understand except I don't think you mean or at least I don't understand what you mean by 'disabled'. I'm assuming you mean locked so the used can't edit that cell/column.
To do that you should highlight the cells/columns that the user is allowed to edit, right click and go to format cells, and under protect uncheck 'Locked' so those cells are NOT locked and then under the Review tab select Protect Sheet and you can select from various option and choose to give a password or not. This will prevent the user from editing that column or any other columns that you left 'Locked'.
As for automatically expanding the formula into additional cells I addressed above.
I recommend the 1st option with making a table. Highlight the area with the data and go to the home tab and select 'Format as Table' under 'Styles'. The make sure the range is correct if the first row is headers or not. Then when it is formatted as a table, when the user starts a new row, Excel will automatically expand the table and copy any formula accordingly.