+ Reply to Thread
Results 1 to 10 of 10

Please help! - Possibly need a Macro?

  1. #1
    Vertoobli
    Guest

    Please help! - Possibly need a Macro?

    Hi,
    Today at work, I was presented with an Excel sheet, which denotes
    users for the company I work with, which is needed for something
    rather urgently.
    This Sheet contains over 120 000 rows of data.
    One thing that is present in the data, that is very important, are
    dates, which denote when an amendment to a users details have been
    made, and therefore, some users have multiple entries.
    What I would like help with is this, I would like to be able to
    automatically delete all but the last update of each user. ie :

    10/06/99 ; Fred Bloggs
    31/02/01 ; Fred Bloggs
    02/03/02 ; Fred Bloggs

    I would like to be able to automatically erase the first two entries,
    leaving only the last. Unfortunately, while I am familiar with
    Formulas and charts and such, this falls outside of my level of
    knowledge. Would anyone please be able to help?
    Regards,

    Vert.

  2. #2
    Roger Govier
    Guest

    Re: Please help! - Possibly need a Macro?

    Hi
    Assuming the dates are in column A, and the names are in column B, then
    create a helper column with the following array entered formula

    {=IF(A1=MAX(($A$1:$A$120000)*--($B$1:$B$120000="Fred Bloggs")),1,0)}

    To enter an array formula, commit with Ctrl+Shift+Enter. Do not type the
    curly braces { } yourself, Excel will enter them when you commit, or
    amend, using Ctrl+Shift+Enter.

    Copy down the helper column.
    Then, Data>Filter>Autofilter and use the dropdown on the helper column
    to Select 0
    Mark the range of Visible rows and Delete.


    --
    Regards

    Roger Govier


    "Vertoobli" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    > Today at work, I was presented with an Excel sheet, which denotes
    > users for the company I work with, which is needed for something
    > rather urgently.
    > This Sheet contains over 120 000 rows of data.
    > One thing that is present in the data, that is very important, are
    > dates, which denote when an amendment to a users details have been
    > made, and therefore, some users have multiple entries.
    > What I would like help with is this, I would like to be able to
    > automatically delete all but the last update of each user. ie :
    >
    > 10/06/99 ; Fred Bloggs
    > 31/02/01 ; Fred Bloggs
    > 02/03/02 ; Fred Bloggs
    >
    > I would like to be able to automatically erase the first two entries,
    > leaving only the last. Unfortunately, while I am familiar with
    > Formulas and charts and such, this falls outside of my level of
    > knowledge. Would anyone please be able to help?
    > Regards,
    >
    > Vert.




  3. #3
    Vertoobli
    Guest

    Re: Please help! - Possibly need a Macro?

    On Sun, 5 Mar 2006 19:36:44 -0000, "Roger Govier"
    <[email protected]> wrote:

    >Assuming the dates are in column A, and the names are in column B, then
    >create a helper column with the following array entered formula
    >
    >{=IF(A1=MAX(($A$1:$A$120000)*--($B$1:$B$120000="Fred Bloggs")),1,0)}
    >
    >To enter an array formula, commit with Ctrl+Shift+Enter. Do not type the
    >curly braces { } yourself, Excel will enter them when you commit, or
    >amend, using Ctrl+Shift+Enter.
    >
    >Copy down the helper column.
    >Then, Data>Filter>Autofilter and use the dropdown on the helper column
    >to Select 0
    >Mark the range of Visible rows and Delete.


    Thankyou very much. I'll make a copy of the file and test this out.
    Regards,
    V.

  4. #4
    Vertoobli
    Guest

    Re: Please help! - Possibly need a Macro?

    On Sun, 5 Mar 2006 19:36:44 -0000, "Roger Govier"
    <[email protected]> wrote:

    >Hi
    >Assuming the dates are in column A, and the names are in column B, then
    >create a helper column with the following array entered formula
    >
    >{=IF(A1=MAX(($A$1:$A$120000)*--($B$1:$B$120000="Fred Bloggs")),1,0)}
    >
    >To enter an array formula, commit with Ctrl+Shift+Enter. Do not type the
    >curly braces { } yourself, Excel will enter them when you commit, or
    >amend, using Ctrl+Shift+Enter.
    >
    >Copy down the helper column.
    >Then, Data>Filter>Autofilter and use the dropdown on the helper column
    >to Select 0
    >Mark the range of Visible rows and Delete.


    I tried this and got a #Value error coming up, I think I may have
    explained it badly, but there are a number of different users, with
    different names, so would I need to insert a wild card of some sort
    for the user names (not all of them are called Fred Bloggs!)
    Regards,
    Vert.

  5. #5
    Roger Govier
    Guest

    Re: Please help! - Possibly need a Macro?

    Hi Vert

    Substitute the cell reference B1 for "Fred Bloggs"
    {=IF(A1=MAX(($A$1:$A$120000)*--($B$1:$B$120000=B1))1,0)}
    Make sure you use Ctrl+Shift+Enter when you edit the formula
    --
    Regards

    Roger Govier


    "Vertoobli" <[email protected]> wrote in message
    news:[email protected]...
    > On Sun, 5 Mar 2006 19:36:44 -0000, "Roger Govier"
    > <[email protected]> wrote:
    >
    >>Hi
    >>Assuming the dates are in column A, and the names are in column B,
    >>then
    >>create a helper column with the following array entered formula
    >>
    >>{=IF(A1=MAX(($A$1:$A$120000)*--($B$1:$B$120000="Fred Bloggs")),1,0)}
    >>
    >>To enter an array formula, commit with Ctrl+Shift+Enter. Do not type
    >>the
    >>curly braces { } yourself, Excel will enter them when you commit, or
    >>amend, using Ctrl+Shift+Enter.
    >>
    >>Copy down the helper column.
    >>Then, Data>Filter>Autofilter and use the dropdown on the helper column
    >>to Select 0
    >>Mark the range of Visible rows and Delete.

    >
    > I tried this and got a #Value error coming up, I think I may have
    > explained it badly, but there are a number of different users, with
    > different names, so would I need to insert a wild card of some sort
    > for the user names (not all of them are called Fred Bloggs!)
    > Regards,
    > Vert.




  6. #6
    Vertoobli
    Guest

    Re: Please help! - Possibly need a Macro?

    Thanks again, Thats so obvious, I should be ashamed of myself!

    On Mon, 6 Mar 2006 22:36:37 -0000, "Roger Govier"
    <[email protected]> wrote:

    >Hi Vert
    >
    >Substitute the cell reference B1 for "Fred Bloggs"
    >{=IF(A1=MAX(($A$1:$A$120000)*--($B$1:$B$120000=B1))1,0)}
    >Make sure you use Ctrl+Shift+Enter when you edit the formula



  7. #7
    Vertoobli
    Guest

    Re: Please help! - Possibly need a Macro?

    Thanks again, Thats so obvious, I should be ashamed of myself!

    On Mon, 6 Mar 2006 22:36:37 -0000, "Roger Govier"
    <[email protected]> wrote:

    >Hi Vert
    >
    >Substitute the cell reference B1 for "Fred Bloggs"
    >{=IF(A1=MAX(($A$1:$A$120000)*--($B$1:$B$120000=B1))1,0)}
    >Make sure you use Ctrl+Shift+Enter when you edit the formula



  8. #8
    Vertoobli
    Guest

    Re: Please help! - Possibly need a Macro?

    Thanks again, Thats so obvious, I should be ashamed of myself!

    On Mon, 6 Mar 2006 22:36:37 -0000, "Roger Govier"
    <[email protected]> wrote:

    >Hi Vert
    >
    >Substitute the cell reference B1 for "Fred Bloggs"
    >{=IF(A1=MAX(($A$1:$A$120000)*--($B$1:$B$120000=B1))1,0)}
    >Make sure you use Ctrl+Shift+Enter when you edit the formula



  9. #9
    Vertoobli
    Guest

    Re: Please help! - Possibly need a Macro?

    Thanks again, Thats so obvious, I should be ashamed of myself!

    On Mon, 6 Mar 2006 22:36:37 -0000, "Roger Govier"
    <[email protected]> wrote:

    >Hi Vert
    >
    >Substitute the cell reference B1 for "Fred Bloggs"
    >{=IF(A1=MAX(($A$1:$A$120000)*--($B$1:$B$120000=B1))1,0)}
    >Make sure you use Ctrl+Shift+Enter when you edit the formula



  10. #10
    Roger Govier
    Guest

    Re: Please help! - Possibly need a Macro?

    Hi

    No need to be ashamed. Sometimes when I'm so close to the problem I fail
    to see the obvious.
    Thanks for the feedback and glad you are sorted.

    --
    Regards

    Roger Govier


    "Vertoobli" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks again, Thats so obvious, I should be ashamed of myself!
    >
    > On Mon, 6 Mar 2006 22:36:37 -0000, "Roger Govier"
    > <[email protected]> wrote:
    >
    >>Hi Vert
    >>
    >>Substitute the cell reference B1 for "Fred Bloggs"
    >>{=IF(A1=MAX(($A$1:$A$120000)*--($B$1:$B$120000=B1))1,0)}
    >>Make sure you use Ctrl+Shift+Enter when you edit the formula

    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1