Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 109
Default extract data from range,and place in the same sheet

Thank you Joel,but small tweak.
Out put not coming from D2:En, out put coming to the corresponding row of the
Name.Say my Name's 1st occurance is in ColA is A5,output is coming in the
corresponding row D5&E5 ,my 2nd occurance is A8,out put coming in D8 &E8.I
need output starts from D2,E2 next D3,E3,next D4,E4.like that.Can you please
modify a little bit.Thanks.



joel wrote:
Sub GetMatches()

'fill in column A with names
LastRow = Range("B" & Rows.Count).End(xlUp).Row
For RowCount = 3 To LastRow
If Range("A" & RowCount) = "" Then
Range("A" & RowCount) = Range("A" & (RowCount - 1))
End If
Next RowCount

Range("D2").Formula = _
"=if(And($A2=$D$1," & _
"month($B2)=month($E$1)," & _
"year($B2)=year($E$1)),A2,"""")"
Range("D2").Copy _
Destination:=Range("D2:E" & LastRow)

Columns("E").NumberFormat = "D-MMM-YY"

End Sub

Col A-------------------Col B------------------ColC---------------------------
Col D-----------------------ColE

[quoted text clipped - 19 lines]
If I select Mary(cell D1) and Apr-099Cell E1) ,the output should display like
above.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200904/1

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Grabbing data from 1 sheet to place in another prem New Users to Excel 1 May 3rd 08 12:47 PM
Use a range value in place of sheet name John Wilson Excel Discussion (Misc queries) 1 February 26th 08 08:46 AM
extract data from a random list & place in another ordered list sean8690 Excel Discussion (Misc queries) 1 January 2nd 07 06:06 PM
Help me, compare 2 sheet and extract the match data into the new sheet. sweetnet Excel Discussion (Misc queries) 1 February 22nd 06 07:49 PM
extract decimal place digit craig_100 Excel Worksheet Functions 3 November 29th 05 06:59 PM


All times are GMT +1. The time now is 12:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"