+ Reply to Thread
Results 1 to 8 of 8

Formula to create a month range based on whether or not values are present in a range

  1. #1
    Registered User
    Join Date
    10-17-2019
    Location
    Middlesex, NJ USA
    MS-Off Ver
    2016
    Posts
    4

    Formula to create a month range based on whether or not values are present in a range

    I am having a devil of a time trying to figure this out --

    I am trying to restructure a rather complicated Frankenstein's monster of a spreadsheet into a format that can be uploaded to a software system built to replace said Frankenstein's monster. A tiny bit of background: the spreadsheet tracks resource allocations to projects for a department in my company. The new software needs each allocation to have a start date and end date, but the data in the spreadsheet is listed per month - an allocation percentage is either present or not for each month. Because of the volume of projects (there are 75) and resources (there are 204), determining the start and end dates manually would be very time consuming.

    snippet.png

    I am attaching an image snippet of the Frankenstein's monster spreadsheet so that you can get a sense of the current format of the data. What I need is to figure out what sort of formula I could insert in the Duration row (highlighted) for each project to look at the 12 rows below it, and return the corresponding month value for both the first in the series with a value in it, and the last.

    Is this possible, or am I doomed to do this manually?
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    07-11-2012
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    144

    Re: Formula to create a month range based on whether or not values are present in a range

    Hi,

    Please find attached for your solution.

    Add your newly created projects in ProjectID sheet and run the macro.
    Attached Files Attached Files
    Ravikumar,

    * Please Add Reputation if solved.

  3. #3
    Registered User
    Join Date
    10-17-2019
    Location
    Middlesex, NJ USA
    MS-Off Ver
    2016
    Posts
    4

    Re: Formula to create a month range based on whether or not values are present in a range

    Ravikumar,

    When I run this macro in my spreadsheet, all it seems to do is copy down highlighted areas thousands of times. Thanks for trying, though!

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: Formula to create a month range based on whether or not values are present in a range

    Row 41. What is your expected answer?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    Registered User
    Join Date
    10-17-2019
    Location
    Middlesex, NJ USA
    MS-Off Ver
    2016
    Posts
    4

    Re: Formula to create a month range based on whether or not values are present in a range

    Row 41 should be as follows, summarizing the twelve rows below it:

    50746 Duration Apr - Jul Mar - Aug Mar - Aug Jul - Dec Jul - Dec
    Last edited by AliGW; 10-21-2019 at 10:27 AM. Reason: Please don't quote unnecessarily!

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: Formula to create a month range based on whether or not values are present in a range

    OK. In C2:
    =IFERROR(INDEX($B3:$B14,MATCH(TRUE,INDEX(ISNUMBER(C3:C14),),))&" - "&LOOKUP(2,1/(C3:C14<>""),$B3:$B14),"")

    Copy across. Copy C2: S2 and copy into other rows....
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-17-2019
    Location
    Middlesex, NJ USA
    MS-Off Ver
    2016
    Posts
    4

    Re: Formula to create a month range based on whether or not values are present in a range

    YOU'VE DONE IT.

    There is absolutely no way I would have ever been able to do that. THANK YOU SO MUCH. Really, this saves me weeks' worth of work.

    Cheers!
    Last edited by AliGW; 10-21-2019 at 10:27 AM. Reason: Please don't quote unnecessarily!

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: Formula to create a month range based on whether or not values are present in a range

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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. How to create a list based on values in a range of cells?
    By 70pjsmith in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-29-2015, 01:25 PM
  2. [SOLVED] Create Sheets based on values in range
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-30-2015, 02:18 PM
  3. values from range present in string?
    By nielsb in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-23-2015, 12:30 PM
  4. Macro or Formula to create Date range by getting input of month and year
    By indianhp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-03-2013, 11:00 AM
  5. [SOLVED] Auto Hiding rows based on range/data present or not present.
    By raze in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 02-10-2013, 11:27 AM
  6. add values based on dates with Month Range
    By bajdr47 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-07-2010, 08:03 PM
  7. [SOLVED] conditional formula: sum a range if text present in another range
    By NeedAdvice777 in forum Excel General
    Replies: 8
    Last Post: 07-12-2006, 06:55 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