We can add a chart in Excel with just one line of VBA code specifying a range with source data. Then we can add as many series (i.e. lines, columns) as needed with an additional line for each new series. That may be needed to keep updating an existing chart with additional weekly or monthly data. In this post we add series that represent additional trials of an ongoing clinical test for a number of sample groups.
Friday, June 14, 2024
Thursday, March 17, 2022
Show Chart For Selected Row via Hyperlink Excel VBA Macro
In this post we learn how to add a chart to show the data in the selected row using Excel VBA macros. We add a hyperlink to each row first, which triggers the procedure to show the chart. Thus, the macro consists of two procedures, one to add the hyperlinks, and another to add a chart every time a hyperlink is clicked. Additionally, the macro requires two event procedures to allow following the hyperlink, and to remove the chart when any other cell is selected. That makes the chart show up for each selected row each time.
Wednesday, February 9, 2022
Copy/Paste Charts To PowerPoint Excel VBA Macro
In this post we learn how to copy/paste charts from Excel to PowerPoint using VBA macros. The macro copies all embedded charts in a worksheet, and pastes each of them in a separate slide in PowerPoint as a picture.
Thursday, January 13, 2022
Resize All Charts In Worksheet Excel VBA Macro
In this post we learn how to resize all charts in the active Excel worksheet at once using VBA macros. The macro also places each chart in a particular position relative to the previous chart, starting from the top left corner of the worksheet. The size of the charts can easily be adjusted changing the values for the Width and Height properties.
Popular Posts
-
In a previous post , we have seen how to send an email from Excel (via Outlook) using VBA macros. We can add as many recipients as needed se...
-
We can integrate Excel with other Microsoft Office applications using VBA. In this post we are going to see how to send an email from Excel ...
-
In this macro example, we compare two worksheets with data from two different versions of the same data set. Thus, we can see if there are a...
-
Excel offers filter options to easily narrow down the data. This macro example activates the filter option in VBA and copies the filtered da...
-
In this post we learn how to upload or export data from Excel to Google Sheets using VBA macros. The macro sends a HTTP request to POST the ...
-
In this post we see how to compare two Excel workbooks with VBA macros. The macro checks if the number of worksheets matches, then compares ...
-
In a previous post we saw how to Compare Two Worksheets in Excel using VBA macros. In this post we see how to compare two columns with data...
-
This macro runs a clock timer in Excel. The user can start/stop the time, and the clock shows minutes and seconds. It is a simple example ...
-
This macro example separates sheets into new workbooks, keeping the original workbook. Each new workbook takes the name of the sheet and con...
-
In this post we see how to delete rows based on given criteria in Excel using VBA macros. The macro loops through each row with content in t...