• 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

Macro file not running for corresponding weeks |VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Macro file not running for corresponding weeks |VBA & Macros|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
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 ForumVBA & MacrosMacro file not running for correspo…
sp_PrintTopic sp_TopicIcon
Macro file not running for corresponding weeks
Avatar
Hitesh Shetty
Member
Members
Level 0
Forum Posts: 7
Member Since:
December 30, 2020
sp_UserOfflineSmall Offline
1
December 30, 2020 - 6:57 pm
sp_Permalink sp_Print
Hello Guys,
 
I've attached a macro file in this email. It is about automating sales report for 3 different weeks. The macro is supposed to run for 1st, 2nd and 3rd week. However, Iam unable to run the macros for 2nd and 3rd week.
 
I've recorded the macro for the 1st week. However, when I try to automate the same for 2nd and 3rd week, It shows runtime error '1004'. The debugger is showing the error as ".Color = -16383844" highlighted in yellow in the VB page.
 
Do I need to make any changes in the code to make the macro run for 2nd and 3rd week.
 
Even the conditional formatting for 'Charged Off' is not reflecting for the 2nd and 3rd weeks.  
 
Avatar
Purfleet
England
Member
Members


Trusted Members
Level 4
Forum Posts: 412
Member Since:
December 20, 2019
sp_UserOfflineSmall Offline
2
December 31, 2020 - 5:38 am
sp_Permalink sp_Print

The attached is a .xlsx file so cant contain a macro, can you uplolad the .xlsm version?

Avatar
Hitesh Shetty
Member
Members
Level 0
Forum Posts: 7
Member Since:
December 30, 2020
sp_UserOfflineSmall Offline
3
December 31, 2020 - 5:01 pm
sp_Permalink sp_Print

Sure

There you go .. The .xlsm file uploaded

Avatar
Hitesh Shetty
Member
Members
Level 0
Forum Posts: 7
Member Since:
December 30, 2020
sp_UserOfflineSmall Offline
4
January 4, 2021 - 10:28 pm
sp_Permalink sp_Print

Please help me with the solution to the problem faced in the macro

Avatar
Purfleet
England
Member
Members


Trusted Members
Level 4
Forum Posts: 412
Member Since:
December 20, 2019
sp_UserOfflineSmall Offline
5
January 6, 2021 - 2:29 pm
sp_Permalink sp_Print

Still no .xlsm file

Avatar
Hitesh Shetty
Member
Members
Level 0
Forum Posts: 7
Member Since:
December 30, 2020
sp_UserOfflineSmall Offline
6
January 6, 2021 - 7:12 pm
sp_Permalink sp_Print

Iam sorry about that.

Let me try uploading the file again and hope it works this time.

Avatar
Hitesh Shetty
Member
Members
Level 0
Forum Posts: 7
Member Since:
December 30, 2020
sp_UserOfflineSmall Offline
7
January 10, 2021 - 9:35 pm
sp_Permalink sp_Print

Please help me with the solution to the macro file.

Avatar
Purfleet
England
Member
Members


Trusted Members
Level 4
Forum Posts: 412
Member Since:
December 20, 2019
sp_UserOfflineSmall Offline
8
January 11, 2021 - 6:48 am
sp_Permalink sp_Print sp_EditHistory

I fear that it would take quite a while to iron out all the parts that need correcting in your code.

the code inserts the same column each time its run, which i guess was not the intention? The contents of coilumn H are then deleted

Half way through the code Week_3 is being referenced, which means that code is acting on that worksheet only. After that you make cell K6 change to delinquent then changed to Charged off

The is also limited to rows up to 501.

If i was you i would forget about the formatting at the moment and just concentrate on getting the marco to do what it needs to then add the formatting after when you know it works.

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online:
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
John Chisholm
vexokeb sdfg
John Jack
Malcolm Toy
Ray-Yu Yang
George Shihadeh
Naomi Rumble
Uwe von Gostomski
Jonathan Jones
drsven
Forum Stats:
Groups: 3
Forums: 24
Topics: 6210
Posts: 27236

 

Member Stats:
Guest Posters: 49
Members: 31888
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.