+ Reply to Thread
Results 1 to 4 of 4

Assign number to each date and venue variable

  1. #1
    Forum Contributor
    Join Date
    10-12-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016 in 2024
    Posts
    857

    Assign number to each date and venue variable

    Hi all

    I am hoping this is a fairly simple task for someone. It may not even require VBA. I have a table with a list of dates and venues. I am looking to create an ID for each of these. So for example, on 11/11/17 for venue A, these should all be assigned an ID of "1". Then for 12/11/17 for venue A, these should have an ID of "2" and so on.

    I have attached a sample workbook and have highlighted in Col C what I am looking to achieve.

    I hope there is someone that can help me with this problem please.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,523

    Re: Assign number to each date and venue variable

    Hi maym,

    As long as the data is sorted how you present it in your example, put this formula in cell C2...

    =IF(ROW()=2,1,IF(AND(A2=A1,B2=B1),C1,C1+1))

    ...and fill down as required.

    Pretty warm in old Sydney town eh?

    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Forum Contributor
    Join Date
    10-12-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016 in 2024
    Posts
    857

    Re: Assign number to each date and venue variable

    thanks so much Trebor.

    Indeed it is an early taste of summer

  4. #4
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,523

    Re: Assign number to each date and venue variable

    You're welcome. Thanks for marking the thread as solved

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Date and venue wise Meeting Schedule
    By leo73pk in forum Excel General
    Replies: 12
    Last Post: 01-11-2011, 01:31 PM
  2. Assign number to variable in VBA?
    By Jalupeno104 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-08-2009, 11:49 AM
  3. [SOLVED] How do I assign a text value to a variable number of rows?
    By Don Guillett in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-06-2005, 06:05 AM
  4. How do I assign a text value to a variable number of rows?
    By Don Guillett in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-06-2005, 04:05 AM
  5. [SOLVED] How do I assign a text value to a variable number of rows?
    By Jday in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  6. [SOLVED] How do I assign a text value to a variable number of rows?
    By Jday in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  7. How do I assign a text value to a variable number of rows?
    By Jday in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  8. [SOLVED] How do I assign a text value to a variable number of rows?
    By Jday in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM

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