auto populate with date + 6 months

flybynyte

New Member
Joined
Jun 5, 2018
Messages
10
Hi Everyone,

I'm in desperate need for a unction/rule.

So, (this is embarrassing) a bunch of people are imputing dates in column G in a spread sheet; they are all different dates. These people need these dates plus 6 months to auto populate in column F.

For instance: column G is 04/30/18; column F needs to auto populate 10/30/2018 as soon as "enter" is hit.

I told them to type it in, or to use EDATE, i got blank stares.

Please help me.

Thank you,

Flybynyte
PS. Stay Sexy...
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Couple ways...one easy, one more "round-a-bout" way of doing it....

Excel 2013/2016
EFG
16/4/201812/4/201812/4/2018
25/2/201811/2/201811/2/2018
31/14/20187/14/20187/14/2018

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
F1=DATE(YEAR(E1),MONTH(E1)+6,DAY(E1))
G1=EDATE(E1,6)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>


OHHHH, I just read on down....so event code in the worksheet is better for them?
 
Last edited:
Upvote 0
This:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("G:G")) Is Nothing Then
    Range("F" & Target.Row).Value = WorksheetFunction.EDate(Target.Value, 6)
End If
End Sub

In the worksheet module would do what they want. You'll have to format column F as Date
 
Upvote 0
Try this:
This is an auto sheet event script
Your Workbook must be Macro enabled
To install this code:
Right-click on the sheet tab
Select View Code from the pop-up context menu
Paste the code in the VBA edit window

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("G:G")) Is Nothing Then
    Target.Offset(, 1).Value = DateAdd("M", 6, Target.Value)
End If
End Sub
 
Upvote 0
It didn't work.

Thanks for trying to help me.
I really thought there was a function/rule that those that.
 
Upvote 0
I really thought there was a function/rule that those that.
There is, it's called EDATE.
The fact that your users don't want to use it doesn't change that.

The users don't have to use EDATE.
You put it in for them before you give them the sheet.
They still put the dates in G, while it updates F with +6months.
 
Last edited:
Upvote 0
*sighs*
I did. it was "too confusing"
There have been about 4 possible solutions. And you said it did not work.

Which solution did not work.
And tell us what did it do or not do which was not what you wanted.
 
Upvote 0

Forum statistics

Threads
1,214,393
Messages
6,119,261
Members
448,880
Latest member
aveternik

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top