Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update other worksheets based on each change on 1st column?

Status
Not open for further replies.

vbahelp07

Technical User
Oct 16, 2007
115
US
I have a spreadsheet.
the 1st sheet is linked to external data that refreshes each month.

The 1st column is RegGroup which could change each month and the number of customer records for each rep could also vary.

Is there a macro that i can use to update other worksheets per RepGroup so that each worksheet only contains the RepGroup info?

the info contains:
RepGroup
CustomerName
Address
MTD
YTD
LMTD
LYTD
TLYTD

currently after i refresh the 1st sheet i have to copy & paste each RepGroup customer set into each individual worksheets per RepGroup.

i am not that good with Excel but i have seen sophisticated worksheets with marcos that update other sheets based on info from the "master" sheet, etc ...

i played a bit with the VLOOKUP
Code:
=VLOOKUP("WILLIAM MOORE ASSOCIATES", A2:B22, 2, FALSE)
this is ok up until i get to this column
the result i get is 0 instead of the Shipping address that it should be pulling.
Code:
=VLOOKUP("WILLIAM MOORE ASSOCIATES", A2:F22, 6, FALSE)

BUT this vlookup is not very efficient. some RepGroups has 100's of customer records and some have several hundreds.

is there an eaiser way?
 
Open your external data spreadsheet.
Create a named range covering all the data
Save and close

Now in your results spreadsheet
Data, ImportExternalData, NewDatabase Query

Post back with any issues (there is probably some useful stuff in FAQ and by searching this forum). This solution is using MS Query.



Gavin
 




FYI, faq68-5829

Skip,

[glasses]I'll be dressed to the nines this week, as I go to have my prostatectomy...
Because, if I'm gonna BE impotent, I want to LOOK impotent![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top