#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Need help...

I am relatively new to VBA.

Here is what I have...

I have a Sheet1 that is my main information.
I have Sheet2 that has "filtered" information from Sheet1 and is used
to work from.

I need to take entered data from Sheet2 and copy that data to Sheet1.

I have Column A set up as an ID# on both sheets.
I need data from Columns O, P, Q on Sheet2 to copy to Columns Q, R, S
on Sheet1 matching the specific ID#.

I am at a loss on how this should be done.

Any help would be very appreciated.

Brian

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default Need help...

You can do that in Excel without resorting to VBA.
On sheet1 put the following formulas:
In Q1: =INDEX(Sheet2!O:O,MATCH(A1,Sheet2!A:A,0))
In R1: =INDEX(Sheet2!P:P,MATCH(A1,Sheet2!A:A,0))
In S1: =INDEX(Sheet2!Q:Q,MATCH(A1,Sheet2!A:A,0))
And drag the formulas down columns Q, R and S

wrote in message
ups.com...
I am relatively new to VBA.

Here is what I have...

I have a Sheet1 that is my main information.
I have Sheet2 that has "filtered" information from Sheet1 and is used
to work from.

I need to take entered data from Sheet2 and copy that data to Sheet1.

I have Column A set up as an ID# on both sheets.
I need data from Columns O, P, Q on Sheet2 to copy to Columns Q, R, S
on Sheet1 matching the specific ID#.

I am at a loss on how this should be done.

Any help would be very appreciated.

Brian



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Need help...

Thanks. that worked.

I have one remaining question that I forgot to add earlier.

How would I do this if the Sheet2 is "added" a later time?

Basically, Sheet2 is created during a "filter" action. People work
from Sheet2 entering information into columns O,P,Q.
I have Sheet2's name set up as a string and placed ina cell for
reference. How can I use that to do what you are suggesting?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default Need help...

I don't understand your question. If you know the name of Sheet2, just put
the name in the formulas. Does the name of the sheet change?

wrote in message
oups.com...
Thanks. that worked.

I have one remaining question that I forgot to add earlier.

How would I do this if the Sheet2 is "added" a later time?

Basically, Sheet2 is created during a "filter" action. People work
from Sheet2 entering information into columns O,P,Q.
I have Sheet2's name set up as a string and placed ina cell for
reference. How can I use that to do what you are suggesting?




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Need help...

Yes.

Sheet2 in this case is created after the filter is applied (through
VB). Sheet2 is renamed for a specific month upon creation. The name of
Sheet2 is held in a cell on Sheet1.

On Oct 4, 12:30 pm, "Tyro" wrote:
Does the name of the sheet change?
- Show quoted text -





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default Need help...

If the name of sheet2 is in cell B1 on sheet1 put the following formulas on
sheet1 in cells:

Q1: =INDEX(INDIRECT($B$1&"!O:O"),MATCH(A1,INDIRECT($B$ 1&"!A:A"),0))
R1: =INDEX(INDIRECT($B$1&"!P:P"),MATCH(A1,INDIRECT($B$ 1&"!A:A"),0))
S1:=INDEX(INDIRECT($B$1&"!Q:Q"),MATCH(A1,INDIRECT( $B$1&"!A:A"),0))

Drag the formulas down columns Q, R and S

Make sure the sheet name in B1 does not have spaces in it.

Tyro

wrote in message
ps.com...
Yes.

Sheet2 in this case is created after the filter is applied (through
VB). Sheet2 is renamed for a specific month upon creation. The name of
Sheet2 is held in a cell on Sheet1.

On Oct 4, 12:30 pm, "Tyro" wrote:
Does the name of the sheet change?
- Show quoted text -





  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Need help...

That worked!

Thanks!!!!

On Oct 4, 1:15 pm, "Tyro" wrote:
If the name of sheet2 is in cell B1 on sheet1 put the following formulas on
sheet1 in cells:

Q1: =INDEX(INDIRECT($B$1&"!O:O"),MATCH(A1,INDIRECT($B$ 1&"!A:A"),0))
R1: =INDEX(INDIRECT($B$1&"!P:P"),MATCH(A1,INDIRECT($B$ 1&"!A:A"),0))
S1:=INDEX(INDIRECT($B$1&"!Q:Q"),MATCH(A1,INDIRECT( $B$1&"!A:A"),0))

Drag the formulas down columns Q, R and S

Make sure the sheet name in B1 does not have spaces in it.

Tyro

wrote in message

ps.com...



Yes.


Sheet2 in this case is created after the filter is applied (through
VB). Sheet2 is renamed for a specific month upon creation. The name of
Sheet2 is held in a cell on Sheet1.


On Oct 4, 12:30 pm, "Tyro" wrote:
Does the name of the sheet change?
- Show quoted text -- Hide quoted text -


- Show quoted text -



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



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

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

About Us

"It's about Microsoft Excel"