Using form buttons to change source data for a chart

richanor

Active Member
Joined
Apr 8, 2006
Messages
291
Hi guys

I would be really grateful if anyone could help / point me in the right direction with this query:

I have a radar (spider) chart for which the source data is in A2:J2, and the column headings are in B1:J1. The data is filled into these cells using a series of VLOOKUPS using the contents of A1 as the lookup value e.g. =VLOOKUP($A$1, Database!$A$3:$AY$100, 4, FALSE).

In the Database sheet, the first column A3:A100 (currently) consists of the record number 1-97

What I would like to do is to add two buttons to the sheet (previous & next), so that when they are clicked, the record number in Front!$A$1, increases or decreases by one but staying within the range of values (i.e. if there are only 50 records, I don't want it to keep advancing beyond 50). The record number in cell Front!$A$1 will then drive the VLOOKUPS, which in turn will feed the Radar Chart.

I know I could achieve something like this using a pivot chart, but I also want to use the values that the VLOOKUPS are pulling through for other things too.

If anyone can help me out with this code, or point me to any resources, I would be really thankful

Cheers

Rich
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
I have just used a simple bit of code to +1 / -1 from the value of Cell $A$1 for now, but if anyone can help me work out how to do this only within the range that exists in Database!A:A that would be great!

Rich
 
Upvote 0

Forum statistics

Threads
1,215,507
Messages
6,125,212
Members
449,214
Latest member
mr_ordinaryboy

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