Awesome!! Thanks a lot Ayush!! Works perfect! Best Regards, Shivam
On Feb 12, 11:55 pm, ayush jain <jainayus...@gmail.com> wrote: > Hi Shivam, > > You can use the below macro to clear the value in corresponding column. > > Private Sub Worksheet_Change(ByVal Target As Range) > > If Target.Column = 1 Then > Target.Offset(0, 1).Value = Now() > End If > > If Target.Column = 1 And Target.Value = "" Then > Target.Offset(0, 1).Value = "" > End If > > End Sub > > Also, if you want to apply same for other columns based on column 1, you can > use offset function like : > For column E: Target.Offset(0, 4).Value = Now() > For column K: Target.offset(0,10).value = Now() > > Let me know if any further help is required on this macro. > > Best regards, > Ayush Jain > > > > On Fri, Feb 12, 2010 at 11:37 PM, Shivam.Shah <shivam...@gmail.com> wrote: > > Hello, > > > First of all, thanks for maintaining such an awesome group! Very > > helpful! > > > I was wondering if I could get help to write a query for the scenario > > where: > > > I enter a value in column A and a date appears in column B, which > > stays fixed and does not change based on the current date. Also, if I > > delete the value from Column A, then the date also gets deleted. > > > This is what I have so far: > > > Private Sub Worksheet_Change(ByVal Target As Excel.Range) > > If Target.Column = 1 Then > > Target.Offset(0, 1).Value = Now() > > End If > > End Sub > > > The problem is, as I said, if I delete the value from column A, the > > date still stays in column B, which I don't want it to anymore. Also, > > can I repeat this for other coloumns, like I want it to apply to > > coloumns E,F and K,L? > > > Any help will be great. > > > Thanks very much! > > > -- > > > ---------------------------------------------------------------------------------- > > Some important links for excel users: > > 1. Follow us on TWITTER for tips tricks and links : > >http://twitter.com/exceldailytip > > 2. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at > >http://www.excelitems.com > > 3. Excel tutorials athttp://www.excel-macros.blogspot.com > > 4. Learn VBA Macros athttp://www.quickvba.blogspot.com > > 5. Excel Tips and Tricks athttp://exceldailytip.blogspot.com > > > To post to this group, send email toexcel-mac...@googlegroups.com > > If you find any spam message in the group, please send an email to: > > Ayush Jain @ jainayus...@gmail.com > > <><><><><><><><><><><><><><><><><><><><><><> > > HELP US GROW !! > > > We reach over 6,700 subscribers worldwide and receive many nice notes about > > the learning and support from the group.Let friends and co-workers know they > > can subscribe to group at > >http://groups.google.com/group/excel-macros/subscribe > > -- > Best regards, > Ayush Jain -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 6,700 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe