PC Review


Reply
Thread Tools Rate Thread

Copy data from data sheet

 
 
Steve
Guest
Posts: n/a
 
      24th Mar 2008
Hi everyone. I have a large data sheet, with the first 6 columns of
data I need. Column 1 of the data sheet is an invoice number. I then
have a calculation sheet. In cell A2 of the calculation sheet is an
invoice number. Can I have vba scan column A of the data sheet for
the invoice number in A2 and return columns 1 thru 6 into the
calculation sheet? Thanks!!!
 
Reply With Quote
 
 
 
 
Barb Reinhardt
Guest
Posts: n/a
 
      24th Mar 2008
You can, but why wouldn't use use VLOOKUP instead?
--
HTH,
Barb Reinhardt



"Steve" wrote:

> Hi everyone. I have a large data sheet, with the first 6 columns of
> data I need. Column 1 of the data sheet is an invoice number. I then
> have a calculation sheet. In cell A2 of the calculation sheet is an
> invoice number. Can I have vba scan column A of the data sheet for
> the invoice number in A2 and return columns 1 thru 6 into the
> calculation sheet? Thanks!!!
>

 
Reply With Quote
 
Steve
Guest
Posts: n/a
 
      25th Mar 2008
Because I have multiple instances of the same invoice number. I need
to copy in every instance of the given invoice number. Thanks!

On Mar 24, 3:54*pm, Barb Reinhardt
<BarbReinha...@discussions.microsoft.com> wrote:
> You can, but why wouldn't use use VLOOKUP instead?
> --
> HTH,
> Barb Reinhardt
>
>
>
> "Steve" wrote:
> > Hi everyone. *I have a large data sheet, with the first 6 columns of
> > data I need. *Column 1 of the data sheet is an invoice number. *I then
> > have a calculation sheet. *In cell A2 of the calculation sheet is an
> > invoice number. *Can I have vba scan column A of the data sheet for
> > the invoice number in A2 and return columns 1 thru 6 into the
> > calculation sheet? *Thanks!!!- Hide quoted text -

>
> - Show quoted text -


 
Reply With Quote
 
GTVT06
Guest
Posts: n/a
 
      26th Mar 2008
On Mar 24, 4:37*pm, Steve <steve_andrus...@yahoo.com> wrote:
> Hi everyone. *I have a large data sheet, with the first 6 columns of
> data I need. *Column 1 of the data sheet is an invoice number. *I then
> have a calculation sheet. *In cell A2 of the calculation sheet is an
> invoice number. *Can I have vba scan column A of the data sheet for
> the invoice number in A2 and return columns 1 thru 6 into the
> calculation sheet? *Thanks!!!


This will find and select your data, but I'm not sure where you want
it pasted.

Sub FindRange()
Dim cell As Range
'Assuming Invoice numbers are located in
'L1:L50 as an example
For Each cell In Worksheets("Data").Range("L1:L50")
If cell.Value = Worksheets("Calc").Range("A2").Value Then
Worksheets("Data").Activate
Range(cell.Address & ":" & cell.Offset(0, 5).Address).Select
End If
Next cell
End Sub
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy rows from one Data sheet to another sheet based on cell conte John McKeon Microsoft Excel Misc 2 15th May 2010 06:49 AM
Auto copy cell data from source sheet to another wrkbook sheet IVLUTA Microsoft Excel Programming 2 2nd Jun 2009 05:07 PM
Copy all data into one sheet and insert origin data... code amend... harteorama@googlemail.com Microsoft Excel Programming 3 15th Sep 2008 02:54 PM
Copy data from column that begins with data to new sheet Snapdaddy Microsoft Excel Discussion 1 17th Apr 2006 12:25 AM
Data copy from a seperate sheet to data sheet ZeroXevo Microsoft Excel Programming 1 20th Jun 2005 08:14 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:04 AM.