Month Day Year Formula Problem

artgoede

New member
Joined
Feb 20, 2013
Messages
4
Reaction score
0
Points
0
I am having trouble with a formula in excel 2007. If I have a cell say A1 = 9/17/11 and I want to populate C1 automatically with the same month and day but want the year to be the current year how do I do that. I have tried everything I can think of. Can someone please help.
 

vsy060687

New member
Joined
Jan 31, 2013
Messages
8
Reaction score
0
Points
0
Write a simple formula in cell C1:....

=DATE(YEAR(TODAY()),MONTH(A1),DAY(A1))
 

vsy060687

New member
Joined
Jan 31, 2013
Messages
8
Reaction score
0
Points
0
Hi all,

I want VLOOKUP function through VBA Array. Please check attached file.....
I have tried below coding but its not working properly....


Sub vlOoo_kup()
Dim sh As Worksheet
Dim rng As Range
Dim arr
Dim i As Integer
Set sh = ThisWorkbook.Sheets("Singh")
Set rng = sh.Range("A1:G21")
arr = sh.Range("i10:i" & sh.Cells(Rows.Count, "i").End(xlUp).Row)
For i = LBound(arr) To UBound(arr)
Dim j As Integer
j = sh.Cells(Rows.Count, "j").End(xlUp).Row + 1
sh.Range("j" & j & ":eek:" & j).FormulaArray = Application.WorksheetFunction.VLookup(arr(i, 1), rng, Array(2, 3, 4, 5, 6, 7, 8, 9), 0)
Next
End Sub




Thanks
 

Attachments

  • array2.xlsm
    19.3 KB · Views: 9
Top