try this

Sub test()
Dim i As Long
For i = 2 To Sheets(1).Range("a65356").End(xlUp).Row
If DateValue(Sheets(1).Cells(i, 1).Value) =
DateValue(Sheets(2).Range("a1").Value) Then
k = Sheets(2).Range("iv2").End(xlToLeft).Column + 1

For j = 2 To 11
Sheets(2).Cells(j, k).Value = Sheets(1).Cells(i, j).Value

Next j
' use exit for if u dnt want to search any more
Exit For

End If
Next i
End Sub


On Tue, Jul 5, 2011 at 5:53 PM, Rajesh K R <rajeshkainikk...@gmail.com>wrote:

> Hi Experts,
>
> Please find the attached file & tell me the code how to select the
> date value in "sheet2" cell "A1" in Sheet 1. After selecting the row
> then all the data in sheet2 range("B2:B11") have to copy & paste in
> the sheet1 colomns("B:K").
>
> Regards
>
> Rajesh Kainikkara
>
> --
>
> ----------------------------------------------------------------------------------
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 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
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>



-- 
*Regards*
* *
*Ashish Koul*
*akoul*.*blogspot*.com <http://akoul.blogspot.com/>
http://akoul.posterous.com/
*akoul*.wordpress.com <http://akoul.wordpress.com/>
My Linkedin Profile <http://in.linkedin.com/pub/ashish-koul/10/400/830>


P Before printing, think about the environment.

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
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

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to