HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

How to create a word cloud in Excel

35,886 views November 2, 2019 7:51

Watch on YouTube
ChannelBrian Dick

Description from the creator

This is the cleanest, least labor intensive way I've found to take data you have in excel and create a word cloud in powerpoint. It does require a little effort, and manual positioning of words, but this is the simplest way I've found.

********Macro 1 (copy and paste between the sub/end sub)**********
For Each Word In Range("A1:A100")
Word.Font.Size = Word.Offset(, 1).Value
Word.Font.Color = Word.Offset(, 2).Value
Next Word

*******Macro #2 (copy and paste between the sub/end sub)*********
Dim rng As Range
Dim PowerPointApp As Object
Dim myPresentation As Object
Dim mySlide As Object
Dim myShape As Object

'Copy Range from Excel
Set rng = ThisWorkbook.ActiveSheet.Range("A1:A100")

'Create an Instance of PowerPoint
On Error Resume Next

'Is PowerPoint already opened?
Set PowerPointApp = GetObject(class:="PowerPoint.Application")

'Clear the error between errors
Err.Clear

'If PowerPoint is not already open then open PowerPoint
If PowerPointApp Is Nothing Then Set PowerPointApp = CreateObject(class:="PowerPoint.Application")

'Handle if the PowerPoint Application is not found
If Err.Number = 429 Then
MsgBox "PowerPoint could not be found, aborting."
Exit Sub
End If

On Error GoTo 0

patreon.com/BrianLeeDick

'Optimize Code
Application.ScreenUpdating = False

'Create a New Presentation
Set myPresentation = PowerPointApp.Presentations.Add

'Add a slide to the Presentation
Set mySlide = myPresentation.Slides.Add(1, 11) '11 = ppLayoutTitleOnly

'Copy Excel Range
rng.Copy

'Paste to PowerPoint and position
mySlide.Shapes.PasteSpecial DataType:=2 '2 = ppPasteEnhancedMetafile
Set myShape = mySlide.Shapes(mySlide.Shapes.Count)

'Set position:
myShape.Left = 66
myShape.Top = 152

'Make PowerPoint Visible and Active
PowerPointApp.Visible = True
PowerPointApp.Activate

'Clear The Clipboard
Application.CutCopyMode = False

About this tutorial

Brian Dick published this 7:51 video tutorial on November 2, 2019. It has been watched 35,886 times on YouTube.

Channel
Brian Dick
Duration
7:51
Published
November 2, 2019
Views
35,886
Likes
101

Tags

Share

This tutorial in other languages