Selecting scatter X/Y ranges via droplist

Derailed_Gerbil

New Member
Joined
Aug 31, 2022
Messages
3
Office Version
  1. 2016
Platform
  1. Windows
I've tried to find a solution for this without luck.

I have a list of values sorted in columns:
ex.
A1​
A2​
A3​
B1​
B2​
B3​
2​
1​
3​
1​
2​
4​
5​
7​
2​
3​
7​
2​

I want one scatter plot that plots A# vs B#, and I want to choose which column A1-3 and B1-3 to plot via cell-values in the sheet.

Is this possible?
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Welcome to the MrExcel board! I do this occasionally using two helper columns, which are plotted. The helper columns in your case would each take the form:
=INDEX(A#,,x)
=INDEX(B#,,y)
...where x and y are the column index numbers in each range (or replace x and y with a common n if you want A1 vs B1 always, A2 vs B2 always, etc.). This pulls only the relevant columns into the helper columns and it is only those two columns that are plotted.
But I'm confused by something. Your profile indicates that you're using Excel 2016 but you've used a "spilling" nomenclature. Some adjustment may be necessary if using 2016...e.g.:
=INDEX($A$2:$C50,,x)
=INDEX($D$2:$F$50,,y)
In the example, blue cells are column index inputs and green cells are plotted.
MrExcel_20220831.xlsx
ABCDEFGHI
1A1A2A3B1B2B312
215912581xy
32610436100A1B2
43711949121125
548121664144236
6349
7464
Sheet2
Cell Formulas
RangeFormula
D2:F5D2=A2^2
H3H3=INDEX(A1:C1,,H1)
I3I3=INDEX(D1:F1,,I1)
H4:H7H4=INDEX($A$2:$C$5,,H1)
I4:I7I4=INDEX($D$2:$F$5,,I1)
Dynamic array formulas.
 
Upvote 0
Thank you for the answer, it works like charm!
the spilling nomenclature was an accident, the # indicated a number but a better way would've been A(n).
 
Upvote 0
You’re welcome…I’m happy to help. About that editing comment…the board implements a10 minute timer during which you can edit your post by clicking on a small “edit” link below your post, make necessary changes, and then resave the new version. After 10 minutes, the “edit” link disappears and you’re out of luck, unless it’s something really important…then you can discuss with a moderator.
 
Upvote 0

Forum statistics

Threads
1,214,870
Messages
6,122,019
Members
449,060
Latest member
LinusJE

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