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

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
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.

The 2 answers with code didn't work, they both had bugs in them.
The other two answers do work for me, not for my users. My users want a cells formatted to auto-populate when they hit enter. Although EDATE works well, it doesn't work for my spread sheet where there are a myriad of different dates, it became "too confusing" for my users because the only way i could keep EDATE was showing the default date (06/30/1900), yet they still can't add up 6 months to the dates they type in.
It wasn't the answers i got from y'all, they were great -just like you guys- ti just can't use them because of my users.

Thank you everyone!
 
Upvote 0
The 2 answers with code didn't work, they both had bugs in them.
Just saying 'It didn't work' isn't very helpful toward the goal of making it work.
In what way didn't it work, did you get an error? What Error? Did it do something different from what you expected? What DID it do, how is that different?

To write code, very specific details are needed. Tell us precisely which cells the users type in, and which cells you want the 6 months added to.
The codes provided looked like general examples of how to do it, without the specific details I wouldn't have expected the code to work 'out of the box' for you.
 
Upvote 0
the only way i could keep EDATE was showing the default date (06/30/1900)
Do you mean that you used something like
=EDATE(E2,6)
But when E2 is blank, it shows 06/30/1900 ?

That's simple to fix..

=IF(E2="","",EDATE(E2,6))
 
Upvote 0
You said in your original post:
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.

My script in post 6 does exactly what you asked for. If a user enters 2/7/18 in column G then the date 2/7/18 plus 6 months will be entered in same row column F

Saying these scripts have bugs in them do not help us solving your issue.
I test all my scripts.
 
Upvote 0
Your correct. My script was wrong put date in wrong column. If user had said it works but in wrong column it would be a easy fix like this:
User never said he needed formatting I would think he could select the entire column and format the way he wanted.

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
 
Last edited:
Upvote 0
You said in your original post:
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.

My script in post 6 does exactly what you asked for. If a user enters 2/7/18 in column G then the date 2/7/18 plus 6 months will be entered in same row column F

Saying these scripts have bugs in them do not help us solving your issue.
I test all my scripts.

Here is where it shows the bug:
Target.Offset(, 1).Value = DateAdd("M", 6, Target.Value)

I don't write script or code,so I can't fix it.
I don't know if this matters, but i'm using Microsoft 2016
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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