Help with a charting data range formula that is "not valid"

birdieman

Well-known Member
Joined
Jan 13, 2016
Messages
551
I have a chart already made -- happens to be a stacked column chart -- that plots 80 data points (in columns).

Sheet name where the data is: Annual Recap
The charts are on a sheet called charts

Here is what I want:

If the value in B6 (on the Annual Recap Sheet) is < 50, then plot the first 70 values in column K starting with K6 ( i.e., plot K6:k76)

Else, plot the first 40 values in column K starting with K6 (i.e., plot K6:k46)

I tried the following formula in the "Series Values" box on the already made chart (where the range of data to be plotted goes), but I get a "that function isn't valid" error. I use Excel 2016
Code:
=OFFSET('Annual Recap'!$K$6,,,IF('Annual Recap'!$B$6<50,70,40))

A poster on this forum suggested this formula, but I have not heard back from them in a while, so I am asking in a different way. -- do not know how to link to the thread, so please do not holler at me.

Can someone tell be what is wrong with the formula? thanks for looking
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,214,815
Messages
6,121,715
Members
449,049
Latest member
THMarana

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