?
Solved

Modification to a date sync macro

Posted on 2012-09-10
2
Medium Priority
?
327 Views
Last Modified: 2012-09-11
Several years ago an EE expert wrote a macro for me that synchronized dates and corresponding values in two files.  The macro assigned a value of zero to correspond with any date in the "A" file that wasn't in the "B" file".  I want to modify this macro so that instead of assigning a zero value, it assigns the previous value in the list.

Example:

20120905     20120905    5
20120906     20120907    4
20120907

At present the result of running the macro is this:

20120905     5
20120906     0
20120907     4

What I now want is this:

20120905     5
20120906     5
20120907     4

I've attached the current macro.  Can someone tell me how to change the code to accomplish my objective.  Thanks.
datesync.xls
0
Comment
Question by:pwflexner
2 Comments
 
LVL 5

Accepted Solution

by:
BullmanTech earned 800 total points
ID: 38388008
In the second For Each loop, change this line of code:

cell2 = 0

to:

celle2 = celle2.Offset(-1, 0).Value
0
 

Author Closing Comment

by:pwflexner
ID: 38388225
Perfect.  Thanks!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

New style of hardware planning for Microsoft Exchange server.
With its various features, Office 365 can not only help you with your day-to-day business tasks, it can also do wonders for your marketing campaign.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question