If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Macro lookup referencing on another spreadsheet

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-28-07, 16:57
MillB MillB is offline
Registered User
 
Join Date: Dec 2006
Posts: 39
Smile Macro lookup referencing on another spreadsheet

Here's my situation:
I've got two spreadsheets. One has columns consisting of 7 date headers (ranging from Friday to Thursday) with the far left column listing several representatives. There are number counts below the dates which need to be captured from spreadsheet 2.
The problem:
Spreadsheet 2 is linked to an Access database and consists of the far left column of representatives, however, the date columns/headers constantly change because sometimes workers come in on the weekend, sometimes they do not. SO, there may not always be 7 days like spreadsheet one. Keeping in mind that this is the source that I must use to pull the data from.
What I have:
I currently have a macro in place for columns and rows that are constant.
It seeks out named region in both spreadsheets, copies from one, then pastes just values into the other.
What I need:
Someone to tell me how I can (without being too complex) incorporate into my macro a search to match dates in both spreadsheets by their rows prior and then pull the corresponding data in the below column and row ranges.

I hope this makes sense...
Any help would be tremendously appreciated.
Attached Thumbnails
Macro lookup referencing on another spreadsheet-spreadsheet-1.jpg   Macro lookup referencing on another spreadsheet-spreadsheet-2.jpg  
Reply With Quote
  #2 (permalink)  
Old 02-28-07, 22:44
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,091
What using the Excel MATCH Function in VBA? To see what it is like, record a macro and setup one cell to use the MATCH function, then see how that looks in VBA.

OTOH, is there specific need to use VBA?
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On