Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-24-2025, 12:30 AM
Pablo2000's Avatar
Pablo2000 Pablo2000 is offline Can the value of a tab be used in a calculation Windows 11 Can the value of a tab be used in a calculation Office 2021
Advanced Beginner
Can the value of a tab be used in a calculation
 
Join Date: Dec 2023
Posts: 73
Pablo2000 is on a distinguished road
Default Can the value of a tab be used in a calculation


This sounds odd but the name I have given to a tab is "25-09-18"

Can I have a cell with the number of days diffrence. i.e.

=DATEDIFF("Tab name",NOW(),"D")


Thanks.
Reply With Quote
  #2  
Old 08-24-2025, 02:02 AM
p45cal's Avatar
p45cal p45cal is offline Can the value of a tab be used in a calculation Windows 10 Can the value of a tab be used in a calculation Office 2021
Expert
 
Join Date: Apr 2014
Posts: 956
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Yes, what version of Excel are you using?
Edit: Oops, I've just noticed what version you're using.
=DATEDIF(DATEVALUE(TEXTAFTER(CELL("filename"),"]")),NOW(),"D")

Last edited by p45cal; 08-24-2025 at 10:28 AM.
Reply With Quote
  #3  
Old 08-24-2025, 02:19 AM
ArviLaanemets ArviLaanemets is offline Can the value of a tab be used in a calculation Windows 8 Can the value of a tab be used in a calculation Office 2016
Expert
 
Join Date: May 2017
Posts: 949
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default

What is a reason you having a separate tab (and probably a table) for every date? Why you don't simply have single table with a date field in it?
Reply With Quote
  #4  
Old 08-25-2025, 12:42 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Can the value of a tab be used in a calculation Windows 11 Can the value of a tab be used in a calculation Office 2021
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,943
Pecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond repute
Default

Perhaps TODAY() instead of NOW() ?
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #5  
Old 08-25-2025, 03:00 AM
Pablo2000's Avatar
Pablo2000 Pablo2000 is offline Can the value of a tab be used in a calculation Windows 11 Can the value of a tab be used in a calculation Office 2021
Advanced Beginner
Can the value of a tab be used in a calculation
 
Join Date: Dec 2023
Posts: 73
Pablo2000 is on a distinguished road
Default

The reason for having a separate date on each tab is these are monthly tabs and I DO NOT want to over write the data of a previous month. I want to keep each monthÂ’s data as is in that year.

I tried =DATEDIF(DATEVALUE(TEXTAFTER(CELL("filename"),"]")),TODAY(),"D") but that is not working

Attached. CELL A15
Attached Files
File Type: xlsx Electric-2025.xlsx (44.8 KB, 7 views)
Reply With Quote
  #6  
Old 08-25-2025, 05:45 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Can the value of a tab be used in a calculation Windows 11 Can the value of a tab be used in a calculation Office 2021
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,943
Pecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond repute
Default

First argument of DATEDIF is start_date, second: end_date, not the other way round
Like =DATEDIF(TODAY(),TEXTAFTER(CELL("filename"),"]"),"d")
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #7  
Old 09-02-2025, 09:40 PM
Scott Huish Scott Huish is offline Can the value of a tab be used in a calculation Windows 11 Can the value of a tab be used in a calculation Office 2021
Novice
 
Join Date: Jul 2025
Posts: 9
Scott Huish is on a distinguished road
Default

In your sample, the tab name is Sep 2025 which is not something that Excel will recognize as a date.
Reply With Quote
  #8  
Old 09-02-2025, 09:42 PM
Scott Huish Scott Huish is offline Can the value of a tab be used in a calculation Windows 11 Can the value of a tab be used in a calculation Office 2021
Novice
 
Join Date: Jul 2025
Posts: 9
Scott Huish is on a distinguished road
Default

But assuming the tab was a date, why do you need DATEDIF, why not just subtract them?
=TEXTAFTER(CELL("filename",A1),"]")-TODAY()
Reply With Quote
  #9  
Old 09-03-2025, 03:20 AM
ArviLaanemets ArviLaanemets is offline Can the value of a tab be used in a calculation Windows 8 Can the value of a tab be used in a calculation Office 2016
Expert
 
Join Date: May 2017
Posts: 949
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default

Attachment 21665
Quote:
Originally Posted by Pablo2000 View Post
The reason for having a separate date on each tab is these are monthly tabs and I DO NOT want to over write the data of a previous month. I want to keep each monthÂ’s data as is in that year.
Attached is an example, how I would do it.

All fixed values are defined on SetUp sheet as named values. In case any of those values change in the future, you have to archive the old workbook, and start a new one with new setup.

On tab Months is the Table tMonths, with columns MMText (the accounting period as text in format "YYYY MMMM", but you can use any other format if you want), the same accounting period as integer in format YYYYMM (this will make it easier to create any reports including several account periods - whenever there is a need for it in future - as those values are ordered), MMStart (start date of accounting period), MMEnd (end date of accounting period), Days (the number of days in accounting period), and RowNo (a helper column for case there will be need to get a value from this Table using INDEX(). You can predefine those periods for any time period into future, and you can add them whenever it is needed.

On tab Calendar is table tCal, with Date as 1st column, where all dates from time period the calendar is filled are present. This Table may contain any number of additional columns of data calculated based on registered date - whatever you will need. I added some needed for your current task. As this Table may be quite large, it will be reasonable to keep the data there as values. Currently I preserved columns I used to calculate those values too (columns with differently colored headers at right) - you may delete those. To avoid any problems when using Calendar in your calculations, the Calendar must start at least a month before your data entry, with a day number determined in SetUp, and must end at least with MMEnd of last registered account period in tMonths. The Calendar must contain all periods you need to enter data for, but there is no restrictions how far into future it is filled.

On tab DataEntry is table tData - obviously the table where you register all your measurement data, with some additional calculated columns which will make reporting easier. To avoid the risk to overwrite data from previous months, you can set the autofilter for this table to current accounting period (MMText). Probably it will be possible to use Data Validation for this Table to restrict entering Date values outside from selected accounting period too, but I didn't have enough free time to do this myself. The columns MMStart and MMEnd were added to make it possible when you think there is a need for this.

On tab repMM I designed a report, where at top of sheet you can select accounting period, and a summary for selected period will be displayed (it will be display the data for selected accounting period aproximately in same format as your current data entry tabs are having). I filled it with some formulas (the ones which read data from SetUp, and from Data entry table). You can fill it from rest of them easily.

When all design is done properly, this workbook may work years for you without any need of redesign (unless some cardinal changes must be done).
Attached Files
File Type: xlsx Electric.xlsx (53.7 KB, 0 views)

Last edited by ArviLaanemets; 09-03-2025 at 09:52 AM.
Reply With Quote
  #10  
Old 09-03-2025, 03:35 AM
p45cal's Avatar
p45cal p45cal is offline Can the value of a tab be used in a calculation Windows 10 Can the value of a tab be used in a calculation Office 2021
Expert
 
Join Date: Apr 2014
Posts: 956
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Quote:
Originally Posted by Scott Huish View Post
In your sample, the tab name is Sep 2025 which is not something that Excel will recognize as a date.
It does here in the UK:
2025-09-03_113149.jpg
Reply With Quote
  #11  
Old 09-07-2025, 11:41 PM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Can the value of a tab be used in a calculation Windows 11 Can the value of a tab be used in a calculation Office 2021
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,943
Pecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond repute
Default

As usual with this OP, feedback is scarce or on-existent once problem solved...
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can the value of a tab be used in a calculation Age Calculation lawlaw Word 8 06-07-2019 06:22 AM
Help with a sum calculation please. ballst Excel 4 06-04-2015 11:40 AM
Can the value of a tab be used in a calculation Formfield calculation Joachim Word 4 03-08-2013 01:56 AM
Please help with age calculation!!! Microsoft Idiot Word 4 10-29-2012 05:54 AM
Can the value of a tab be used in a calculation Date Calculation Lights Excel 5 04-18-2012 04:31 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:43 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft