Eskypades
Board Regular
- Joined
- Nov 19, 2009
- Messages
- 98
I'm not sure how exactly to go about doing this. I know in my head what I'd like to see, but how it works out in Excel I'm not exactly sure. Here is my situation.
I have a spreadsheet that tracks product sales by date and store number. The data is pulled from another spreadsheet and put into a usable format. However, the formula used to sum the product sales varies depending on the day of the week. I've named each of the formulas as follows:
StoreSun
StoreMon
StoreTue
StoreWed
StoreThu
StoreFri
StoreSat
If the weekday of the particular day is a Sunday, then it should reference the StoreSun formula; if Monday, then StoreMon, and so on. I could use a whole lot of nested IF functions (such as IF(WEEKDAY(A1)=1,StoreSun,IF(WEEKDAY(A1)=2,StoreMon,etc...) but that seems rather inefficient, not to mention cumbersome. I thought perhaps the INDIRECT function would work, but this apparently doesn't work with named formulas, only cell ranges. I need to be able to reference the named formula depending on what day of the week it is.
Any help would be greatly appreciated. If there is a simpler way to go about this, I'm all ears.
Thanks,
Stephen
I have a spreadsheet that tracks product sales by date and store number. The data is pulled from another spreadsheet and put into a usable format. However, the formula used to sum the product sales varies depending on the day of the week. I've named each of the formulas as follows:
StoreSun
StoreMon
StoreTue
StoreWed
StoreThu
StoreFri
StoreSat
If the weekday of the particular day is a Sunday, then it should reference the StoreSun formula; if Monday, then StoreMon, and so on. I could use a whole lot of nested IF functions (such as IF(WEEKDAY(A1)=1,StoreSun,IF(WEEKDAY(A1)=2,StoreMon,etc...) but that seems rather inefficient, not to mention cumbersome. I thought perhaps the INDIRECT function would work, but this apparently doesn't work with named formulas, only cell ranges. I need to be able to reference the named formula depending on what day of the week it is.
Any help would be greatly appreciated. If there is a simpler way to go about this, I'm all ears.
Thanks,
Stephen