Please see the attached File.

 

Sub pasteData()

Dim rng As Range

Dim cell As Range

Set rng = Sheets("Sheet1").Range("A3:A" &
Sheets("Sheet1").UsedRange.Rows.Count)

For Each cell In rng

If cell.Value = ActiveSheet.Range("B1").Value Then

ActiveSheet.Range("C2:C11").Copy

        Sheets("Sheet1").Activate

       Range("B" & cell.Row).PasteSpecial Paste:=xlPasteValues,
Operation:=xlNone, SkipBlanks _

        :=False, Transpose:=True

Exit sub

End If

Next

End Sub

 

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of ankur
Sent: Tuesday, July 05, 2011 6:30 PM
To: excel-macros@googlegroups.com
Subject: Re: $$Excel-Macros$$ select row which have specified data

 

hi rajesh 
i used formulas in sheet 1 , to get data from sheet 2....
just enter your data in sheet 2, it will be displayed against the date in
sheet 1
may this  may help u....
find attached file
Have A Nice Time & Enjoy Life

Regards:
CMA Ankur Pandey
(Someone Different)

I'm not the best but i'm not like the rest~~



On Tue, Jul 5, 2011 at 6:23 PM, ashish koul <koul.ash...@gmail.com> wrote:

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
<http://www.excel-macros.blogspot.com/> 
4. Learn VBA Macros at http://www.quickvba.blogspot.com
<http://www.quickvba.blogspot.com/> 
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
<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

 <http://akoul.blogspot.com/> akoul.blogspot.com
http://akoul.posterous.com/

 <http://akoul.wordpress.com/> akoul.wordpress.com

My <http://in.linkedin.com/pub/ashish-koul/10/400/830>  Linkedin Profile

 

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

 

-- 
----------------------------------------------------------------------------
------
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

-- 
----------------------------------------------------------------------------------
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

Attachment: Copy of SOLUTION OF FIND(1).xlsm
Description: application/vnd.ms-excel.sheet.macroenabled.12

Reply via email to