PC Review


Reply
Thread Tools Rate Thread

Checking a database/excel sheet for new entries

 
 
sportsman1900@yahoo.com
Guest
Posts: n/a
 
      25th Jun 2007
Hello everybody! I posted a question earlier and figured I'd put an
example in to clarify what I'm seeking help for.

Here's a sample set of data - the comma's signify delimited data
(different columns.)

I have row headings strarting in A1 and they go to A5.
First row of data starts in A2. (Please note below data is just dummy
data)

Transaction Number, Company, Date, City, Status
Accntg-123-01,Alpha Corp,20070101,New York,New Data
Accntg-123-02,Beta Corp,20070508,New Jersey,New Data
Accntg-235-01,Gamma Corp,20070301,Delaware,New Data
Accntg-163-01,Delta Corp,20070101,New Haven,New Data
Accntg-175-01,Espsilon Corp,20071101,Newark,New Data

OK, the worksheet contains more data and columns, but above is done
only for the sake of example. Now, here's the problem. I input 3 more
rows of data starting at the next available cell in column A. This
data represents updates to entries above - here's the example:

Accntg-235-01,Gamma-C Corp,20075601,Delaware,New Data
Accntg-123-01,AlphaDog Corp,20072115,New York,New Data
Accntg-163-01,Delta Blues Corp,20070105,New Haven,New Data

As you can see, column A above is similar to 3 entries in the original
data - so, once these entries are recorded, I want to press a button
to run a macro, which would compare the latest entries with the
previous entries by looking at column A and if there's a match above,
then column E should be changed from "New Data" to "Old Data" - here's
what it should look like after i run the macro:

Transaction Number, Company, Date, City, Status
Accntg-123-01,Alpha Corp,20070101,New York,Old Data
Accntg-123-02,Beta Corp,20070508,New Jersey,New Data
Accntg-235-01,Gamma Corp,20070301,Delaware,Old Data
Accntg-163-01,Delta Corp,20070101,New Haven,Old Data
Accntg-175-01,Espsilon Corp,20071101,Newark,New Data
Accntg-235-01,Gamma-C Corp,20075601,Delaware,New Data
Accntg-123-01,AlphaDog Corp,20072115,New York,New Data
Accntg-163-01,Delta Blues Corp,20070105,New Haven,New Data

As you can see, the first entry in cell A2 matches A8, which is the
latest transaction, so cell E2 gets changed from "New Data" to "Old
Data." So, whenever i run this macro, the latest entries (at the
bottom of the data) represents new data and compares contents of
whatever is in A with that above and if there's a match above it, the
entries in column E gets updates from "New Data" to "Old Data."

I hope this was clear - please let me know if you need anything
further.

Thanks,

Tim

 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      25th Jun 2007
How would the macro know where the old data ends and the new data starts.

Is the new data cleared once the macro is run and the update is made? What
about new data that does not match any of the old data?

--
Regards,
Tom Ogilvy


"(E-Mail Removed)" wrote:

> Hello everybody! I posted a question earlier and figured I'd put an
> example in to clarify what I'm seeking help for.
>
> Here's a sample set of data - the comma's signify delimited data
> (different columns.)
>
> I have row headings strarting in A1 and they go to A5.
> First row of data starts in A2. (Please note below data is just dummy
> data)
>
> Transaction Number, Company, Date, City, Status
> Accntg-123-01,Alpha Corp,20070101,New York,New Data
> Accntg-123-02,Beta Corp,20070508,New Jersey,New Data
> Accntg-235-01,Gamma Corp,20070301,Delaware,New Data
> Accntg-163-01,Delta Corp,20070101,New Haven,New Data
> Accntg-175-01,Espsilon Corp,20071101,Newark,New Data
>
> OK, the worksheet contains more data and columns, but above is done
> only for the sake of example. Now, here's the problem. I input 3 more
> rows of data starting at the next available cell in column A. This
> data represents updates to entries above - here's the example:
>
> Accntg-235-01,Gamma-C Corp,20075601,Delaware,New Data
> Accntg-123-01,AlphaDog Corp,20072115,New York,New Data
> Accntg-163-01,Delta Blues Corp,20070105,New Haven,New Data
>
> As you can see, column A above is similar to 3 entries in the original
> data - so, once these entries are recorded, I want to press a button
> to run a macro, which would compare the latest entries with the
> previous entries by looking at column A and if there's a match above,
> then column E should be changed from "New Data" to "Old Data" - here's
> what it should look like after i run the macro:
>
> Transaction Number, Company, Date, City, Status
> Accntg-123-01,Alpha Corp,20070101,New York,Old Data
> Accntg-123-02,Beta Corp,20070508,New Jersey,New Data
> Accntg-235-01,Gamma Corp,20070301,Delaware,Old Data
> Accntg-163-01,Delta Corp,20070101,New Haven,Old Data
> Accntg-175-01,Espsilon Corp,20071101,Newark,New Data
> Accntg-235-01,Gamma-C Corp,20075601,Delaware,New Data
> Accntg-123-01,AlphaDog Corp,20072115,New York,New Data
> Accntg-163-01,Delta Blues Corp,20070105,New Haven,New Data
>
> As you can see, the first entry in cell A2 matches A8, which is the
> latest transaction, so cell E2 gets changed from "New Data" to "Old
> Data." So, whenever i run this macro, the latest entries (at the
> bottom of the data) represents new data and compares contents of
> whatever is in A with that above and if there's a match above it, the
> entries in column E gets updates from "New Data" to "Old Data."
>
> I hope this was clear - please let me know if you need anything
> further.
>
> Thanks,
>
> Tim
>
>

 
Reply With Quote
 
sportsman1900@yahoo.com
Guest
Posts: n/a
 
      25th Jun 2007
On Jun 25, 11:51 am, Tom Ogilvy <TomOgi...@discussions.microsoft.com>
wrote:
> How would the macro know where the old data ends and the new data starts.
>
> Is the new data cleared once the macro is run and the update is made? What
> about new data that does not match any of the old data?
>
> --
> Regards,
> Tom Ogilvy
>
>
>
> "sportsman1...@yahoo.com" wrote:
> > Hello everybody! I posted a question earlier and figured I'd put an
> > example in to clarify what I'm seeking help for.

>
> > Here's a sample set of data - the comma's signify delimited data
> > (different columns.)

>
> > I have row headings strarting in A1 and they go to A5.
> > First row of data starts in A2. (Please note below data is just dummy
> > data)

>
> > Transaction Number, Company, Date, City, Status
> > Accntg-123-01,Alpha Corp,20070101,New York,New Data
> > Accntg-123-02,Beta Corp,20070508,New Jersey,New Data
> > Accntg-235-01,Gamma Corp,20070301,Delaware,New Data
> > Accntg-163-01,Delta Corp,20070101,New Haven,New Data
> > Accntg-175-01,Espsilon Corp,20071101,Newark,New Data

>
> > OK, the worksheet contains more data and columns, but above is done
> > only for the sake of example. Now, here's the problem. I input 3 more
> > rows of data starting at the next available cell in column A. This
> > data represents updates to entries above - here's the example:

>
> > Accntg-235-01,Gamma-C Corp,20075601,Delaware,New Data
> > Accntg-123-01,AlphaDog Corp,20072115,New York,New Data
> > Accntg-163-01,Delta Blues Corp,20070105,New Haven,New Data

>
> > As you can see, column A above is similar to 3 entries in the original
> > data - so, once these entries are recorded, I want to press a button
> > to run a macro, which would compare the latest entries with the
> > previous entries by looking at column A and if there's a match above,
> > then column E should be changed from "New Data" to "Old Data" - here's
> > what it should look like after i run the macro:

>
> > Transaction Number, Company, Date, City, Status
> > Accntg-123-01,Alpha Corp,20070101,New York,Old Data
> > Accntg-123-02,Beta Corp,20070508,New Jersey,New Data
> > Accntg-235-01,Gamma Corp,20070301,Delaware,Old Data
> > Accntg-163-01,Delta Corp,20070101,New Haven,Old Data
> > Accntg-175-01,Espsilon Corp,20071101,Newark,New Data
> > Accntg-235-01,Gamma-C Corp,20075601,Delaware,New Data
> > Accntg-123-01,AlphaDog Corp,20072115,New York,New Data
> > Accntg-163-01,Delta Blues Corp,20070105,New Haven,New Data

>
> > As you can see, the first entry in cell A2 matches A8, which is the
> > latest transaction, so cell E2 gets changed from "New Data" to "Old
> > Data." So, whenever i run this macro, the latest entries (at the
> > bottom of the data) represents new data and compares contents of
> > whatever is in A with that above and if there's a match above it, the
> > entries in column E gets updates from "New Data" to "Old Data."

>
> > I hope this was clear - please let me know if you need anything
> > further.

>
> > Thanks,

>
> > Tim- Hide quoted text -

>
> - Show quoted text -


Tom,

Thank for looking at this. Basically once I have the new data entered
in, I would run the macro and it would start from the bottom (last row
containing data) and work it's way up. So, let's say it encounters
Transaction Number Accntg-163-01 in cell A20, which happens to be the
last row of data, it should automatically assign "New Data" in E20. It
will then go to A19 and if the Transaction Number is not
Accntg-163-01, E19 would also have "New Data" put into it. As long as
it hasn't encountered a duplicate Transaction Number, "New Data" will
always be entered into the corresponding E cell. Now, let's say A15
has Accntg-163-01 in it. Then, E15 would have "Old Data" as its
entry.

No data gets erased, new or old - we want to keep a track of all
transactions - updates are made to existing transaction numbers.
Everything is driven off the entries in column A. I hope I've been
able to explain this better. Thanks again for looking into this.

Tim

 
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
Excel 2003 - VBA - Checking to see if a sheet is present Craig Brandt Microsoft Excel Discussion 2 10th Jul 2008 02:55 PM
Checking a database/excel sheet for new entries sportsman1900@yahoo.com Microsoft Excel Programming 0 25th Jun 2007 03:52 PM
Checking a database/excel sheet for new entries sportsman1900@yahoo.com Microsoft Excel Programming 2 25th Jun 2007 03:49 PM
checking for duplicate entries in database Steve Microsoft Access Form Coding 1 29th Jun 2006 04:27 AM
How do I set up a Lottery sydicate checking sheet in excel? =?Utf-8?B?TXllNjM=?= Microsoft Excel New Users 0 11th Apr 2006 01:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:16 PM.