Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8270517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:35:22+00:00 2026-06-08T06:35:22+00:00

I have been facing a problem for some time now with my Excel macro

  • 0

I have been facing a problem for some time now with my Excel macro and I have not been able to find a solution anywhere. What I want to do is described below:

I have an Excel sheet that includes the EPG information of a TV channel for the current month.
One column includes the names of the TV programs/events. Next to it, another column that includes the corresponding start time of each TV program (e.g. 13:15) and a third column that includes the corresponding date of each event (20/07/2012).

The problem is that the day does not change after 00:00 as it should but it changes at 06:00 in the morning instead. I want a macro that searches the whole time column, find any time that is between 00:00 06:00 and go to the corresponding date cell and change the date (add one day). Is that possible, and how?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T06:35:23+00:00Added an answer on June 8, 2026 at 6:35 am

    You don’t need VBA. Insert a column just after your date column. I’m assuming now that your times are in column B and your dates are in column C. now in your new column D put the formula

    =IF(AND(B1 >= 00:00 and B1 < 06:00), C1 + 1, C1)
    

    Then you can hide column C if you like. And change the number format of column D to be a date. I’m not 100% sure on the syntax for comparing a time though, i.e. the A1 >= 00:00 but according to this thread: http://www.excelbanter.com/showthread.php?t=212849 it should be

    =IF(AND(B1 >= TIME(0,0,0) and B1 < TIME(6,0,0), C1 + 1, C1)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been using Zend framework some time now, but I'm facing a problem I
Hell All, So I have been facing this behavior for quite some time and
Since some days, I have been facing a problem in Visual Studio 2008, related
We have been facing a small problem in MySQL procedure. We have placed some
Context: An ongoing problem we have been facing is unit testing our market data
So, I have been facing a problem with using subprocess for a python app
So I have been developing in Android for quite some time and I am
We have been facing Out of Memory errors in our App server for sometime.
I have been facing issue with sphinx result set for string attribute. Below is
Have been looking on some tutorials for drawing canvas using SurfaceView, but the only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.