• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Issue with Dates() when using formulae with named cell inside the ()|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / Issue with Dates() when using formulae with named cell inside the ()|General Excel Questions & Answers|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumGeneral Excel Questions & Answe…Issue with Dates() when using formu…
sp_PrintTopic sp_TopicIcon
Issue with Dates() when using formulae with named cell inside the ()
Avatar
Barry Pegram
Gloucestershire UK
Member
Members
Level 0
Forum Posts: 14
Member Since:
March 21, 2022
sp_UserOfflineSmall Offline
1
March 27, 2022 - 1:29 am
sp_Permalink sp_Print

I have two Excel workbooks that I use to manage my gardening hobby. One book holds all sorts of data and the other has input/output forms to manipulate and display the info in various ways.

The data sheets log all of my purchases, sowing, harvesting, composting records and reminders, and much more.

 My VBA skills are fairly limited but using tips, tricks and snippets from the web manage to finish up with something that works most of the time.

Here’s the crunch – one thing that sort of works but has an irritating interruptions is:

One of the output forms reads data from the jobs to do ‘now’ schedule and outputs a list with the due date  and the task etc.

Some of the dates are frost dependant so I have a named cell ‘Last_Frost’ holding the date of the anticipated last frost in one of the data sheets. One use of this date is to set the job date (relative to frost date) by virtue of a formulae in the due date column of the data file: 

 =DATE(YEAR(Last_Frost),MONTH(Last_Frost)-1,DAY(Last_Frost)-15). Or similar.

While the Sub that produces the output is reading the data file it pauses its progress with a MS Excel window stating:

The name ‘Last_Frost’ already exists. Click Yes to use that version of the name, or click No to rename the version of ‘Last_Frost’ you’re moving or copying. (with buttons Yes, Yes too All, No).  N>B> This interruption occurs TWICE for each time in encounters a date with this type of formulae.

I click Yes and then I get the window:

UpdateValues:FileName.xlsm – where I am offered a list of files to choose from. (With buttons Open Cancel)

Whether I click on the filename where the data is stored and click Open or if I click Cancel the result is the same – the Sub continues and ultimately the final output list is correct. If I click No I am offer a window to input an alternative name.

From the above info can anyone tell me how to overcome this interruption please, while maintaining the reference to the frost date?

I’m sure someone will ask that I attach a copy of the files BUT there are 11 Forms Sheets and  17 Data sheets in two workbooks I would be reluctant to upload the lot and I am not sure I have the skill to chop out the necessary bits and have it work ok to demonstrate the problem!!

Any suggestions please? Thanks, in anticipation.

sp_AnswersTopicSeeAnswer See Answer
Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 627
Member Since:
November 1, 2018
sp_UserOfflineSmall Offline
2
March 28, 2022 - 6:50 pm
sp_Permalink sp_Print

This happens when you copy between workbooks that have the same name defined in them. If you want to just accept the default option in the message box ('Yes', in this case), you can add:

 

Application.Displayalerts = False

before the code that adds the copied data to the other workbook.

sp_AnswersTopicAnswer
Answers Post
Avatar
Barry Pegram
Gloucestershire UK
Member
Members
Level 0
Forum Posts: 14
Member Since:
March 21, 2022
sp_UserOfflineSmall Offline
3
March 29, 2022 - 2:47 am
sp_Permalink sp_Print

That is perfect. Thanks again.

Beepee

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online:
Guest(s) 9
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 871
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
Jessica Stewart: 205
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
stuart burge
Bruce Tang Nian
Scot C
Othman AL MUTAIRI
Misael Gutierrez Sr.
Attif Ihsan
Kieran Fee
Murat Hasanoglu
Brett Dryland
Saeed Aldousari
Forum Stats:
Groups: 3
Forums: 24
Topics: 6223
Posts: 27295

 

Member Stats:
Guest Posters: 49
Members: 31920
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.