Need help on Excel function

April 15, 2009 at 11:44:01
Specs: Windows XP
Is there a excel function that I can use to solve my problem? Help!

In sheet 1 I have the follow data:

Line No Amount MaturityDate
790 500 12/31/10
790 350 10/8/15
790 65 9/6/09
1230 135 6/30/11
3265 653 7/4/12

I want to pick all the data with line No. 790 from sheet 1 to sheet2. I know that I can use filter function and copy paste to sheet 2. But is there a function I can use in this scenario? Thanks!!

See More: Need help on Excel function

Report •

April 15, 2009 at 12:52:25
Is the data sorted just like your example or would the 790 be mixed in all over the place?

Is 790 the only number you are looking for or will you be puliing in data from the other numbers at various times?

Would you be willing to use a macro instead of an Excel function?

Report •

April 15, 2009 at 18:33:20
The No.790 is in the Line No. column, and that is the only number that I'm looking for. If you can show me how to use macro in this scenario, that would be great. Thanks for your help!

Report •

April 15, 2009 at 21:17:40
I guess that means that the answer to my first question is "No".

Maybe this will get you started:

Sub Copy790()
 For sht1Row = 1 To 1000
  If Sheets(1).Range("A" & sht1Row) = 790 Then
   sht2Row = sht2Row + 1
   Sheets(1).Range("A" & sht1Row).EntireRow.Copy _
      Destination:=Sheets(2).Range("A" & sht2Row)
  End If
End Sub

Report •

Related Solutions

April 16, 2009 at 10:59:03
It works! Thanks a lot DerbyDad03!

Report •

Ask Question