Lock formulas within Table

Domroy

Board Regular
Joined
Mar 8, 2018
Messages
114
Hey all,

I have a workbook in which I move records from one tab (table) to another regularly. The tables are identical, as I have to just move the records while the individual goes through a process, and track it. Each time I move the record to the new table, the field in which I calculate the age (based on birth date) brings in the previous table reference (subsequently screwing up all the records in the new table). I have to go in and edit it every single time. Is there a way to lock the formula so that it just references the DOB field each time, and not the previous table? Here's my formula:

=IF(ISBLANK([@DOB]),"",INT((TODAY()-[@DOB])/365))

Every time I move it, it adds the table reference before [@DOB].

Thanks so much! This will save me tons of time if we can fix.

Judi
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hey all,

I have a workbook in which I move records from one tab (table) to another regularly. The tables are identical, as I have to just move the records while the individual goes through a process, and track it. Each time I move the record to the new table, the field in which I calculate the age (based on birth date) brings in the previous table reference (subsequently screwing up all the records in the new table). I have to go in and edit it every single time. Is there a way to lock the formula so that it just references the DOB field each time, and not the previous table? Here's my formula:

=IF(ISBLANK([@DOB]),"",INT((TODAY()-[@DOB])/365))

Every time I move it, it adds the table reference before [@DOB].

Thanks so much! This will save me tons of time if we can fix.

Judi
incase you have put dollar sign in your formula, you need to remove them thus unlocking the cell so when you move your data it moves all of it just like the rest since you said that its only cell with date of birth that doesn't move.
 
Upvote 0
I didn't put the "$" because it didn't seem to work. That's normally how I would do it, but using the column name as the reference, it didn't like it.
 
Upvote 0
I didn't put the "$" because it didn't seem to work. That's normally how I would do it, but using the column name as the reference, it didn't like it.
i asked so because when a cell is locked then you move its contents to another sheet, it will still reference to the same cell. which cell is D.O.B. WRITTEN, you could use a formula say like if a certain cell has data, then formula shud take the contents of cell with date of birth in the new table. so in both tabs, both cells that should have DOB always have the same data. you can use the cell that carries the name of the first person. =IF(SHEET1!A2="",A1,"") SO WHENEVER YOU MOVE THE DATA, THEN MAIN TABLE IS LEFT EMPTY AND FORMULA WILL TAKE DATE OF BIRTH THATS IN A1 OF THIS SHEET YOU MOVED DATA TO. BOTH A1 IN THE 2 TABLES WILL HAVE THE SAME DATA FOR YOUR FORMULA TO WORK
 
Upvote 0
Hmm...I'm not sure I understood what you said, but it got me to thinking that maybe if I lock it and use the column letter name ("M") rather than the named range ("DOB"), that might work. I'll check it out when I get back to the office. I still think it'll try to take the table name with the formula when moved, but I'll try.
 
Upvote 0
Hmm...I'm not sure I understood what you said, but it got me to thinking that maybe if I lock it and use the column letter name ("M") rather than the named range ("DOB"), that might work. I'll check it out when I get back to the office. I still think it'll try to take the table name with the formula when moved, but I'll try.
ALL you need is to give the cell a 2nd choice when moved it can use the second choice. using if function
 
Upvote 0
use the column letter name ("M") rather than the named range ("DOB"), that might work.
Given that your table structures are identical that is what I would do. (y)
Excel Formula:
=IF(ISBLANK(M2),"",INT((TODAY()-M2)/365))
 
Upvote 0
Solution
Yup. Using the cell reference rather than the named range did it. Thanks for bouncing the ideas around.
 
Upvote 0

Forum statistics

Threads
1,215,465
Messages
6,124,977
Members
449,200
Latest member
Jamil ahmed

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top