+ Reply to Thread
Results 1 to 4 of 4

Autofill one column based on another column using a certain logic

  1. #1
    Registered User
    Join Date
    07-09-2009
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    5

    Autofill one column based on another column using a certain logic

    Autofill one column based on another column using a certain logic
    Hi,

    I have two columns in my excel sheet say EventName and EventId ,where based on the EventName the Event_id should get auto-populated.

    Say if the value of event_name is ab the event_id would be 1 and if it's xy the event-id would be 2,but again if the event_name is ab,the event_id should be 1.

    I am attaching here a example table of how the entries should look like:

    Event_id Event_Name
    1 ab
    2 bc
    3 xy
    1 ab
    3 xy
    4 df
    5 ed
    2 bc

    Hence when the Event-name is occurring for the first time in Event_Name column the event_id column should get populated with the max value+1 for that column,while for same entry in Event_name column the event_id should get the corresponding value of the same event_name.

    Can someone please guide me on how to achieve this?

    Thanks
    Arnab

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Autofill one column based on another column using a certain logic

    Not clear if you wanted a VBA sub routine or not, you could do this with formulae - eg if first event_name is listed in B2 then:

    Please Login or Register  to view this content.
    written in more conventional manner the above would be:

    Please Login or Register  to view this content.
    Let us know...

  3. #3
    Registered User
    Join Date
    07-09-2009
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Autofill one column based on another column using a certain logic

    Hi Moderator,

    Thank-you very much,it really worked.

    I should have mentioned that I needed it in macro or formula.But luckily this time I needed it in Formula only.

    Thanks Arnab

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Autofill one column based on another column using a certain logic

    Thread moved to Worksheet Functions Forum - please also mark as solved if complete (see FAQ / How To? for more info. if required)

+ 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