+ Reply to Thread
Results 1 to 3 of 3

Nested Loops due to multiple rows with same ID

  1. #1
    Registered User
    Join Date
    12-14-2016
    Location
    US
    MS-Off Ver
    Office365 Pro Plus
    Posts
    2

    Nested Loops due to multiple rows with same ID

    Hi,
    I've got an excel sheet that looks like this more or less:

    ID Title Desc Revision Status Date Changed
    1 Excel Problem Need help 1 New 12/1/16
    1 Excel Problem I need help 2 New 12/2/16
    1 Excel Problem I need help 3 Approved 12/4/16
    1 Excel Problem Better desc of problem 4 Approved 12/5/16
    1 Excel Problem Better desc of problem 5 Closed 12/6/16
    2 Another Problem So many questions 1 New 12/3/16

    So basically I am tracking the day that the status changes, and I am trying to get the amount of time between when each item was approved and closed. Which if those items were on the same row or in the same location all the time I could get that, but since I am needing to look at seeing for each ID, what is the first occurrence of "Approved" status and what was the Date Changed for that row, and then also see the same for "Closed" and do that for every ID. So I think I need to loop through the IDs, and loop when I hit a new ID. But I'm not sure how to do that when you can see that due to the fact that each item has been revised - updated description or whatever, the status may be Approved multiple times, and I just need the first time. And I guess I need to write all this to a new worksheet - something like ID - Title - Approved Date - Closed Date - DateDiff. So I am also condensing from having multiple rows with the same ID to just having one row with the relevant data.

    Any help or even just suggestions of the direction to go would be greatly appreciated! I have been trying to google and get bits of VBA code here and there, but I am not sure what kind of loops or how to nest them? Thank you!!!!!!!!!!!
    Last edited by t3chg1rl; 12-14-2016 at 04:24 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    13,000

    Re: Think I need nested loops but not sure which ones?

    title updated, thanks...
    Last edited by protonLeah; 12-14-2016 at 05:38 PM.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    12-14-2016
    Location
    US
    MS-Off Ver
    Office365 Pro Plus
    Posts
    2

    Re: Think I need nested loops but not sure which ones?

    I have changed the title but I'm not really sure what was wrong with my title? I don't know what kind of nested loops I need help with, it's kind of hard to make it more accurate? Thanks

+ 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. Nested Loops
    By asdasdasdadw in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-24-2014, 02:30 PM
  2. [SOLVED] Nested Loops
    By Walter12 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-06-2012, 07:29 AM
  3. nested loops
    By short_n_curly in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-22-2012, 11:10 AM
  4. Nested loops VBA
    By zurich in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-06-2012, 03:21 PM
  5. Nested Do Loops
    By ross88guy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-08-2010, 09:10 AM
  6. Many Nested loops
    By naterator in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-19-2006, 05:45 PM
  7. nested loops
    By jer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-15-2006, 05:15 PM
  8. nested for loops and end for
    By SandyR in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-06-2005, 05: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