ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copying Dates from One sheet to another (https://www.excelbanter.com/excel-programming/300821-copying-dates-one-sheet-another.html)

iomighty[_9_]

Copying Dates from One sheet to another
 
I am finishing up my workbook and am having difficulty having tw
columns of dates on my master worksheet copy onto my second workshee
in my desired format.

For example:

In my primary worksheet I enter my dates in Columns "N"
and "O".


Ex. Entered First sheet:

Column N ("First Date") is 31-Jan-04
Column O ("Date 2") is 28-Feb-04


On my second sheet am trying to have these two dates replicate i
Column "N" as

RESULT:

Row N1 = 31-Jan-04
Row N2 = 31-Jan-04
Row N3 = 28-Feb-04
Row N4 = 28-Feb-04

Has anyone done something like this yet or can offer any suggestions?
appreciate all the advice so far.

The rest of the worksheet I have done in VBA. Having my othe
information entered into my primary sheet has not been a problem excep
for the date.

*To get an idea of my overall goal is I building a workbook where dat
entered into the "Primary sheet" replicates into four rows on m
"Secondsheet" I have been able to write commands to do the basi
elements of this but this date issue has been unsuccessful.

Thanks again,
Mat

--
Message posted from http://www.ExcelForum.com


SunTzuComm

Copying Dates from One sheet to another
 
Hello, Matt!

You need to format the cells before moving the dates into them.

Range("N1:N4").Select
Selection.NumberFormat = "dd-mmm-yy"
[n1] = Range("First_Date").Value
[n2] = [n1]
[n3] = Range("Date_2").Value
[n4] = [n3]

Regards,
Wes

Marcotte A[_2_]

Copying Dates from One sheet to another
 
Does the pattern of dates continue? IE

First sheet -goto -Second Shee
N1 N1, N
O1 N3, N
N2 N5, N
O2 N7, N
N3 N9, N1
O3 N11, N1

If so, use this formula in column N on your second sheet
=INDIRECT(ADDRESS(CEILING((ROW()-1)/4+1,1),IF(MOD(FLOOR(ROW()/2,1),2)=1,14,15)))

iomighty[_10_]

Copying Dates from One sheet to another
 
thanks to both of you. i wam trying this out right now. i will post i
a few how it works out.

thanks,
mat

--
Message posted from http://www.ExcelForum.com


iomighty[_12_]

Copying Dates from One sheet to another
 
Hi, I have been working with your instructions but I have not been abl
to get it to work. Any suggetions for VB editor?

thanks, Matt

~× wrote:
*Does the pattern of dates continue? IE:

First sheet -goto -Second Sheet
N1 N1, N2
O1 N3, N4
N2 N5, N6
O2 N7, N8
N3 N9, N10
O3 N11, N12

If so, use this formula in column N on your second sheet.
=INDIRECT(ADDRESS(CEILING((ROW()-1)/4+1,1),IF(MOD(FLOOR(ROW()/2,1),2)=1,14,15))


--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 11:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com