Adding Values to Data Set at Beginning & End of a Row?

jdlev

New Member
Joined
Jan 6, 2017
Messages
27
Hi Guys,

I'm trying to do something that is fairly complex (at least for me anyways). I'm trying to create a function that will do the following:

1) Look at each day of the week. If no cell in the day is > 0, the business is closed no that particular day, and the formula should return "Closed"
2) For days that a business is open, the first and last value in the array is transferred to a corresponding cell in another data set below the primary data set (see image for example). This may also be the point to gather the 2 values immediately after the first value and 2 values immediately before the last value.
3) The purpose of gathering the 3 values at the beginning & end of the data set is to forecast the 2 "0" values immediately before the first value in the row that is > 0 and the 2 values immediately after the last number in the data set > 0.
4) The values that are transferred to the lower data set must meet certain criteria. They must be higher than a specific threshold to transfer. For this example I used 20. I used a simple IF statement coupled w/ the FORECAST function to determine the values I was looking for, which brought up another question. Is there a way to just return the value of the test function rather than inserting the same equation twice...once for the test, and immediately followed by what happens if the equation is true? Here's my formula:

=IF((FORECAST($K$13,L18:N18,$L$13:N13)>20),FORECAST($K$13,L18:N18,$L$13:N13),0)
- wasn't sure if there was a way to drop the 2nd "FORECAST($K$13,L16:N16,L13:$N$13)"?

5) The last step is to add the plotted forecast values to a chart that already has all the primary dataset figures in it, and add a different styled line to show the forecast figures.

Anyone that can lend a hand...I owe ya one!!! Thanks in advance for any help!


To provide a clearer understanding of what I'm trying to accomplish, this would be an example of what the finished product would look like:

37807227866_3ce4084fbc_o.png
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Nobody has any ideas?? I knew what I was asking was complicated, but I didn't think I could stump Mr. Excel! :nya:
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top