• 394K Members
• 6,791 Online
• 425K Conversations

## Populating Range of cells for months based on another cells value

Occasional Contributor

# Populating Range of cells for months based on another cells value

In the attached workbook, what i am wanting to do is only populate the cells A19:A34 based on the month in cell B8. The month in Cell B8 will change based on other formulas. Can this be done with the other formulas staying in place?

5 Replies

# Re: Populating Range of cells for months based on another cells value

@drt_80 hello. I'm not sure I fully understand what you want. A19 is based on cell B6. If you mean you want the date of cell B6 but using the month of B8, that formula would be changed to:

=IF(ISBLANK(B6),"",DATE(YEAR(B6),MONTH(B8),DAY(B6)))

Since A20:A34 are based on the cell directly above it, assuming that's what you want, you wouldn't need to change them.

If you're looking for something else, please be as specific as possible and tell us what you need.

# Re: Populating Range of cells for months based on another cells value

@Zack Barresse  Hello, sorry about that, it should be in the cell range A20:A34. What im needing is the gray table to populate upto the month that is in cell B8. If the value of B8 is 5/20/2020 that is the last month i need showing up in the gray table. Then if the value in B8 changes to 6/15/2020, i need the gray chart to automatically populate.

# Re: Populating Range of cells for months based on another cells value

@drt_80 looks like you'd have a circular reference by pointing to B8. It also looks like you've duplicated the calculations. Perhaps you started down one path and then went down another? You could circumvent the circular reference by putting the upstream calculations in the formula itself, but I wouldn't suggest that here because of the number of calculations you're performing, the formula would get very messy very quickly.

From a quick view it looks like you're trying to calculate a number of "available" work days which takes into account weekend, rain, cold, and wet days, including holidays. There are also areas for calculation failure. The most obvious is calculating February to have 28 days, which is hard-coded. You could probably do without the 'DO NOT TOUCH' sheet entirely I'd suspect, as well as consolidating some of your other ranges of data. I would suggest you look at your logic of rain/cold/wet days (it may be what you want, given the margin of error, I just don't know your model well enough to know its accuracy).

My suggestion is to go back to the drawing board and define what it is you're trying to do and build a model which supports your inputs and outputs as desired. My guess is this started out much simpler and was built upon without full knowledge of the end product, thus hampering 'good' design.

# Re: Populating Range of cells for months based on another cells value

@Zack Barresse  Thank you for your help. It started out very simple and users wanted to add everything it. I may scrap it and start over. Thanks for your help.

# Re: Populating Range of cells for months based on another cells value

@drt_80 That is my suggestion, although I'm aware it's costing someone additional work. My recommendation for design is to keep it as tabular and relational as possible. Good luck and post back if you need anything else.

Related Conversations