Camaro5 Chevy Camaro Forum / Camaro ZL1, SS and V6 Forums - Camaro5.com
 
dave@hennessey
Go Back   Camaro5 Chevy Camaro Forum / Camaro ZL1, SS and V6 Forums - Camaro5.com > Members Area > Off-topic Discussions

Reply
 
Thread Tools
Old 10-19-2017, 05:47 PM   #1
JayhawkSS1LE
 
JayhawkSS1LE's Avatar
 
Drives: 2017 SS 1LE
Join Date: Jun 2017
Location: Woodstock, GA
Posts: 200
HELP: Excel Date in Column based on Value in another column

I need some excel help... Column B is Date and Column C in Time. Down Column C is listed:
0:00
0:30
1:00...
.
.
.
23:30
0:00
0:30

Essentially what I need in Column B (Date) is the date to be the same from time 0:00 thru 23:30 and then when 0:00 hits in Column C the date increase by 1 day to the next date. I have 6 months worth of data that is in 30 minute increments such as this, that I need to assign dates to. The first date is April 1, 2017 listed in the cell as 2017-01-04

Any help would be appreciated!

Thanks
__________________
17 SS 1LE.
JayhawkSS1LE is offline   Reply With Quote
Old 10-19-2017, 06:13 PM   #2
kmarshall2121

 
kmarshall2121's Avatar
 
Drives: 2012 45th Anniversary Edition
Join Date: Aug 2012
Location: San Diego, CA
Posts: 1,618
at the beginning of the c cell, type '=XXX+1'
xxx is the last cell you want to add one to... If I am understanding what you are trying to do anyway... dont forget to format the new cell to the 'date' format
kmarshall2121 is offline   Reply With Quote
Old 10-19-2017, 06:19 PM   #3
Steve Dallas
Commits weekly crime
 
Steve Dallas's Avatar
 
Drives: 2017 Camaro 1LT
Join Date: Nov 2009
Location: Camano Island, WA
Posts: 9,513
First, you can put two dates that are the same in column B, then highlight both of those dates. If you then click on the lower right corner of that selection and drag down to where the 23:30 time is, that will autofill all the dates so they are all the same.

Unfortunately, the autofill isn't intelligent enough to autofill for 6 months like that. You can fill blocks of one day at a time that way, which might speed things up.

That is the non-programming way to do this.

Then, there is using VBA to do this. I'm not sure what version of Excel you are using...and that might make things a little different.

Essentially, you can write a script that will fill a column with the dates, incrementing the date by one every 48 cells, until the date reaches the date you need to stop.
__________________
2017 Camaro 1LT - Blue Barchetta IV
I fire up the willing engine, responding with a roar. Tires spitting gravel I commit my weekly crime.
Steve Dallas is offline   Reply With Quote
Old 10-19-2017, 06:29 PM   #4
Zzzato
Bigg Balls
 
Zzzato's Avatar
 
Drives: 2024 Red Hot 1SS
Join Date: Jul 2017
Location: SLC
Posts: 164
This is the easiest way to this.
In your first three date cells block erase it, input these values starting at April 1 00:00 -01:00.





Grab the three blocks drag them down to the end and change the format to short date or whatever date format you want. All this is doing is converting the time and date to a serial number and then your converting it back to what you want.
Attached Images
 
__________________
2017 Red Hot 1SS 8A..... Sold for a minivan
2024 Red Hot 1SS 8A.... No mods ..... yet
Zzzato is offline   Reply With Quote
Old 10-19-2017, 07:17 PM   #5
JayhawkSS1LE
 
JayhawkSS1LE's Avatar
 
Drives: 2017 SS 1LE
Join Date: Jun 2017
Location: Woodstock, GA
Posts: 200
Quote:
Originally Posted by Steve Dallas View Post

Essentially, you can write a script that will fill a column with the dates, incrementing the date by one every 48 cells, until the date reaches the date you need to stop.
Thank you. Yes, this is exactly what I need to do is increase the date by 1 every 48 cells...

I am dealing with almost 8800 rows of data on this sheet and I have 70 similar sheets. I definitely need some formula
__________________
17 SS 1LE.
JayhawkSS1LE is offline   Reply With Quote
Old 10-19-2017, 07:20 PM   #6
JayhawkSS1LE
 
JayhawkSS1LE's Avatar
 
Drives: 2017 SS 1LE
Join Date: Jun 2017
Location: Woodstock, GA
Posts: 200
Quote:
Originally Posted by Zzzato View Post
This is the easiest way to this.
In your first three date cells block erase it, input these values starting at April 1 00:00 -01:00.





Grab the three blocks drag them down to the end and change the format to short date or whatever date format you want. All this is doing is converting the time and date to a serial number and then your converting it back to what you want.
Thank you, the date doesnt change when it gets to the next 0:00 Time.

I need the date to change when it hits the 0:00 time in Column C, like this (but the same date needs to carry down until the next 0:00 time and then increase the date by 1)
Attached Images
 
__________________
17 SS 1LE.
JayhawkSS1LE is offline   Reply With Quote
Old 10-19-2017, 07:28 PM   #7
Steve Dallas
Commits weekly crime
 
Steve Dallas's Avatar
 
Drives: 2017 Camaro 1LT
Join Date: Nov 2009
Location: Camano Island, WA
Posts: 9,513
What version of Excel are you using? I use 2010, so I could write you a VBA script in that...
__________________
2017 Camaro 1LT - Blue Barchetta IV
I fire up the willing engine, responding with a roar. Tires spitting gravel I commit my weekly crime.
Steve Dallas is offline   Reply With Quote
Old 10-19-2017, 07:31 PM   #8
JayhawkSS1LE
 
JayhawkSS1LE's Avatar
 
Drives: 2017 SS 1LE
Join Date: Jun 2017
Location: Woodstock, GA
Posts: 200
Here is the answer! Thanks for all that helped!

=DATEVALUE("2017-04-01")+1*(INT(ROW(B49)/48)-1)
__________________
17 SS 1LE.
JayhawkSS1LE is offline   Reply With Quote
Old 10-19-2017, 07:33 PM   #9
Steve Dallas
Commits weekly crime
 
Steve Dallas's Avatar
 
Drives: 2017 Camaro 1LT
Join Date: Nov 2009
Location: Camano Island, WA
Posts: 9,513
Awesome.

VBA scripting can be very handy, if you ever want to dabble in it.
__________________
2017 Camaro 1LT - Blue Barchetta IV
I fire up the willing engine, responding with a roar. Tires spitting gravel I commit my weekly crime.
Steve Dallas is offline   Reply With Quote
Old 10-19-2017, 07:49 PM   #10
jrhagen
Banned
 
Drives: Camaro
Join Date: Mar 2013
Location: USA
Posts: 2,701
Use this.
Attached Images
 
jrhagen is offline   Reply With Quote
Old 10-19-2017, 09:17 PM   #11
Zzzato
Bigg Balls
 
Zzzato's Avatar
 
Drives: 2024 Red Hot 1SS
Join Date: Jul 2017
Location: SLC
Posts: 164
Quote:
Originally Posted by JayhawkSS1LE View Post
Thank you, the date doesnt change when it gets to the next 0:00 Time.

I need the date to change when it hits the 0:00 time in Column C, like this (but the same date needs to carry down until the next 0:00 time and then increase the date by 1)
Weird mine totally did.
__________________
2017 Red Hot 1SS 8A..... Sold for a minivan
2024 Red Hot 1SS 8A.... No mods ..... yet
Zzzato is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 07:56 PM.


Powered by vBulletin® Version 3.8.9 Beta 4
Copyright ©2000 - 2025, vBulletin Solutions, Inc.