VBA Help

hoopslogan

Board Regular
Joined
Jun 21, 2016
Messages
94
Hi,

I need help creating code for the following situation:
I have two sheets. The first sheet is called the targetSheet and the second sheet is the sourceSheet. In column 4 of the targetsheet the values are either True or False. I want to make a graph of the monthly data for each True value on the targetsheet and place these graphs onto a new sheet. Basically, if the value is True on the targetSheet I want it to lookup the data from the sourcesheet for the corresponding row and create a line graph of the monthly data provided.

TARGETSHEET
Industry 1Industry 2ValuesT/FIndex
AT1Value 1FALSEA-T1-Value 1
AT1Value 2TRUEA-T1-Value 2
AT2Value 1TRUEA-T2-Value 1
AT2Value 2FALSEA-T2-Value 2
AT3Value 1TRUEA-T3-Value 1
AT3Value 2FALSEA-T3-Value 2
AT4Value 1FALSEA-T4-Value 1
AT4Value 2FALSEA-T4-Value 2
A Total 1 Total Value 1FALSEA Total 1--Total Value 1
A Total 2 Total Value 2FALSEA Total 2--Total Value 2
BF1Value 1FALSEB-F1-Value 1
BF1Value 2FALSEB-F1-Value 2
BF2Value 1TRUEB-F2-Value 1
BF2Value 2FALSEB-F2-Value 2
BF3Value 1FALSEB-F3-Value 1
BF3Value 2FALSEB-F3-Value 2
B Total 1 Total Value 1FALSEB Total 1 --Total Value 1
B Total 2 Total Value 2FALSEB Total 2--Total Value 2

<colgroup><col span="2"><col><col><col></colgroup><tbody>
</tbody>






SOURCESHEET
Industry 1Industry 2ValuesMonth 1Month 2 Month 3Month 4Month 5Month 6Month 7Month 8Month 9Index
AT1Value 11.00 %2.00 %3.00 %4.00 %5.00 %6.00 %7.00 %8.00 %9.00 %A-T1-Value 1
AT1Value 22.00%3.00%4.00%5.00%6.00%7.00%8.00%9.00%10.00%A-T1-Value 2
AT2Value 13.00 %4.00 %5.00 %6.00 %7.00 %8.00 %9.00 %10.00 %11.00 %A-T2-Value 1
AT2Value 24.00%5.00%6.00%7.00%8.00%9.00%10.00%11.00%12.00%A-T2-Value 2
AT3Value 15.00 %6.00 %7.00 %8.00 %9.00 %10.00 %11.00 %12.00 %13.00 %A-T3-Value 1
AT3Value 26.00%7.00%8.00%9.00%10.00%11.00%12.00%13.00%14.00%A-T3-Value 2
AT4Value 17.00 %8.00 %9.00 %10.00 %11.00 %12.00 %13.00 %14.00 %15.00 %A-T4-Value 1
AT4Value 28.00%9.00%10.00%11.00%12.00%13.00%14.00%15.00%16.00%A-T4-Value 2
A Total 1 Total Value 19.00 %10.00 %11.00 %12.00 %13.00 %14.00 %15.00 %16.00 %17.00 %A Total 1--Total Value 1
A Total 2 Total Value 210.00%11.00%12.00%13.00%14.00%15.00%16.00%17.00%18.00%A Total 2--Total Value 2
BF1Value 111.00 %12.00 %13.00 %14.00 %15.00 %16.00 %17.00 %18.00 %19.00 %B-F1-Value 1
BF1Value 212.00%13.00%14.00%15.00%16.00%17.00%18.00%19.00%20.00%B-F1-Value 2
BF2Value 113.00 %14.00 %15.00 %16.00 %17.00 %18.00 %19.00 %20.00 %21.00 %B-F2-Value 1
BF2Value 214.00%15.00%16.00%17.00%18.00%19.00%20.00%21.00%22.00%B-F2-Value 2
BF3Value 115.00 %16.00 %17.00 %18.00 %19.00 %20.00 %21.00 %22.00 %23.00 %B-F3-Value 1
BF3Value 216.00%17.00%18.00%19.00%20.00%21.00%22.00%23.00%24.00%B-F3-Value 2
B Total 1 Total Value 117.00 %18.00 %19.00 %20.00 %21.00 %22.00 %23.00 %24.00 %25.00 %B Total 1--Total Value 1
B Total 2 Total Value 218.00%19.00%20.00%21.00%22.00%23.00%24.00%25.00%26.00%B Total 2--Total Value 2

<colgroup><col span="2"><col><col span="9"><col></colgroup><tbody>
</tbody>
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,214,952
Messages
6,122,457
Members
449,083
Latest member
Ava19

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