PC Review


Reply
Thread Tools Rate Thread

compare and compile nonblank data from seperate workbooks in an automated user form

 
 
heyitsthechad@gmail.com
Guest
Posts: n/a
 
      23rd Feb 2007
Hello,
I am trying to simplify compiling of data from different users. Here
is the situation: A single master sheet is sent out to 5 different
regions. In this master sheet are hundreds and sometimes thousands of
shipping lanes. To simplify these lanes have an predetermined id
number, an origin, and a destination and a blank origin charge and
destination charge. If either the origin or destination resides in
that region, they fill in the appropriate charge and send back the
file.

The problem is I am receiving back 5 different sheets with scattered
information and manually copy pasting nonblank information from each
to create a complete master sheet. This has become time consuming so
using my vba knowledge (limited) I created a blank excel worksheet
with a form on it that has 5 buttons each labeled for a region, that
brings an open workbook dialog. Once a user selects the appropriate
workbook, the full path is stored in a cell next to the button.
Basically the user can select the 5 sheets (same worksheet, different
data) and prepare for them to be compiled.

Here is the code for each button.

Sub AMNO()
Dim amno_var As Variant
amno_var = Application.GetOpenFilename("Excel (*.xls),*.xls", ,
"Open dialog test")
If amno_var <> False Then
Range("amno_txt") = amno_var
Else
MsgBox "the Open was cancelled"
End If

End Sub
Sub AMLA()
Dim amla_var As Variant
amla_var = Application.GetOpenFilename("Excel (*.xls),*.xls", ,
"Open dialog test")
If amla_var <> False Then
Range("amla_txt") = amla_var
Else
MsgBox "the Open was cancelled"
End If

End Sub
Sub ASPA()
Dim aspa_var As Variant
aspa_var = Application.GetOpenFilename("Excel (*.xls),*.xls", ,
"Open dialog test")
If aspa_var <> False Then
Range("aspa_txt") = aspa_var
Else
MsgBox "the Open was cancelled"
End If

End Sub
Sub EURO()
Dim euro_var As Variant
euro_var = Application.GetOpenFilename("Excel (*.xls),*.xls", ,
"Open dialog test")
If euro_var <> False Then
Range("euro_txt") = euro_var
Else
MsgBox "the Open was cancelled"
End If

End Sub
Sub EMA()
Dim ema_var As Variant
ema_var = Application.GetOpenFilename("Excel (*.xls),*.xls", ,
"Open dialog test")
If ema_var <> False Then
Range("ema_txt") = ema_var
Else
MsgBox "the Open was cancelled"
End If

End Sub

Those are the buttons, under which I have another button labeled
"compile", which is what I am trying to code.

Now the tricky part for me is to successfully create a new workbook
that compares and compiles the data. I suppose the first workbook to
open (AMNO) would simply copy to a new workbook. The second workbook
to open (AMLA) would have a loop that compared the ID numbers on each
sheet and if nonblank data within that row existed, it would copy that
nonblank data to its comparable cell within the new workbook. So on
and so forth. This is essentially a fill in the blank as each of the
5 sheets are a piece to the puzzle.

Any insight would be very appreciated, at this point im stuck!!

Thanks in advance.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?cmViZWx4dA==?=
Guest
Posts: n/a
 
      26th Feb 2007
Assuming this is not a situation where you can simply share the master sheet,
I can think of one other possibility. Export the data from each returned
sheet to a text file, using File>SaveAs. Read each file from a macro
function, integrating the data into your master sheet.

"(E-Mail Removed)" wrote:

> Hello,
> I am trying to simplify compiling of data from different users. Here
> is the situation: A single master sheet is sent out to 5 different
> regions. In this master sheet are hundreds and sometimes thousands of
> shipping lanes. To simplify these lanes have an predetermined id
> number, an origin, and a destination and a blank origin charge and
> destination charge. If either the origin or destination resides in
> that region, they fill in the appropriate charge and send back the
> file.
>


 
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
Compile data from several workbooks Space Elf Microsoft Excel Worksheet Functions 1 27th May 2010 09:33 PM
Copy/ move selected data from workbooks to seperate worksheets or workbooks Positive Microsoft Excel Worksheet Functions 1 30th Aug 2007 04:54 PM
RE: Macro to Pull Data from Seperate Workbooks =?Utf-8?B?TWFydGluIEZpc2hsb2Nr?= Microsoft Excel Programming 5 19th Dec 2006 04:28 AM
RE: Macro to Pull Data from Seperate Workbooks =?Utf-8?B?TWFydGluIEZpc2hsb2Nr?= Microsoft Excel Programming 0 19th Dec 2006 01:11 AM
Compare 2 columns in seperate workbooks Keenman Microsoft Excel Worksheet Functions 0 10th Sep 2004 12:32 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:02 AM.