VBA - How to Create a Visual Basic Macro Chart Based on Expenses

WinterRose

New Member
Joined
Dec 17, 2020
Messages
1
Office Version
  1. 2019
Platform
  1. Windows
  2. MacOS
Hello,

I am a newbie working with VBA on Excel. I have been trying to figure out to create a pie chart and a column chart using the following data to show expenses by locations. How would I create a chart that shows expenses based on each location in VBA?

Distribution Centers Budget Proposal for 2021
Locations
ExpensesCerritosSanta MonicaCulver CityEl SegundoTotal
Rent$ 12,000$ 18,000$ 15,000$ 16,000$ 61,000
Salaries150,000175,000165,000155,000$ 645,000
Equipment35,00045,00032,00030,000$ 142,000
General Office25,25032,15028,15619,250$ 104,806
Advertising15,00020,15021,58018,540$ 75,270
Commission35,00025,00026,15035,000$ 121,150
Total$ 272,250$ 315,300$ 287,886$ 273,790$ 1,149,226
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,223,886
Messages
6,175,195
Members
452,616
Latest member
intern444

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