Altering an excel spreadsheet that has Macros

kazdeenbrett

New Member
Joined
Mar 6, 2003
Messages
1
This is actually pretty juvenal but I would like to know how to do it. I think that by now everyone has seen an excel spreadsheet containing an NCAA Basketball tournament style format but with women as the teams. The brackets have the names and when you click on the next bracket 2 images of the women come up and you must chose, the winner moves on. This continues until there is a final and then 1 winner. I would like to know how to update or change the names and pictures. I think it would be cool to alter it to actually work for the NCAA tourney and would like to replace the womens names and pictures with the actual brackets that comes out before this years NCAA tournament. It would be a quick and easy way to fill out the brackets for the many comapny/friends pools that are out there. I would, of course, also like to be able to update the female tourney with new women and updated pics of some of the ones currently in it. If anyone could help me I would appreciate it. Thank you.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Sorry I don't have an answer for you. I do have a question though :D !!!

Where did you get the Excel file that you are using for the tounament. I need to find a (preferrably free) tournament spreadsheet for an office pool.

Thanks!

Dr Late
 
Upvote 0
bump!

For search assistance, this has also been called Deloitte Girls and Totty World Cup.
As Brett says, juvenile, but a fun distraction for a friday. Contains a few bits of cool excel wizardry in the background:
-the 'decision' cells are like hyperlinks which open a page where the faces & names of the two competing women are served up, from a tab named DATA, which doesn't appear at the bottom
- the code for the Match worksheet is VB heavy, suggesting that the pictures are served from a shapes folder or file

Right, sorted some of it:
1. unhide hidden sheets with format > sheet > unhide
2. display the abcs & the 123s with tools>options>view>window options>display row & column headers [edit: you don't actually need to do this but i've just found it]

The DATA worksheet stores names, seems to assign random numbers then sorts by them to randomly create each new tournament matchup, and has a scoring counter based on how each girlscharacter did in the last round. What I can't figure out is where the pitcures are getting called from. Here's the VB from the 'PlayMatch' module, which calls the Game worsheet and populates it with the two characters and their names, naming the buttons at the top as the player names.
The PlayerLeft and PlayerRight seem to be the names, so Port and Stbd must be the picture references.


Option Explicit
Sub Play_Match(PlayerLeft As String, PlayerRight As String)
Dim i As Integer
If PlayerLeft = "" Or PlayerRight = "" Then Exit Sub
For i = 1 To Worksheets("Game").Shapes.Count
If Not (Worksheets("Game").Shapes(i).Name = "LeftButton" Or Worksheets("Game").Shapes(i).Name = "RightButton") Then
Worksheets("Game").Shapes(i).Visible = False
End If
Next i
ActiveWindow.DisplayVerticalScrollBar = False
ActiveWindow.DisplayHorizontalScrollBar = False
With Worksheets("Game")
.Unprotect
.Shapes("LeftButton").DrawingObject.Text = PlayerLeft & " wins"
.Shapes("RightButton").DrawingObject.Text = PlayerRight & " wins"
.Shapes("Port").Top = (.Range("a1:h17").Height - .Shapes("Port").Height) / 2
.Shapes(PlayerLeft).Top = (.Range("a1:h17").Height - .Shapes(PlayerLeft).Height) / 2
.Shapes(PlayerRight).Top = (.Range("a1:h17").Height - .Shapes(PlayerRight).Height) / 2
.Shapes("Stbd").Top = (.Range("a1:h17").Height - .Shapes("Stbd").Height) / 2
.Shapes("Port").Left = (.Range("a1:h17").Width / 2 - .Shapes("Port").Width) / 2
.Shapes(PlayerLeft).Left = (.Range("a1:h17").Width / 2 - .Shapes(PlayerLeft).Width) / 2
.Shapes(PlayerRight).Left = (.Range("a1:h17").Width / 2 - .Shapes(PlayerRight).Width) / 2 + .Range("a1:h17").Width / 2
.Shapes("Stbd").Left = (.Range("a1:h17").Width / 2 - .Shapes("Stbd").Width) / 2 + .Range("a1:h17").Width / 2
.Shapes("Port").Visible = True
.Shapes(PlayerLeft).Visible = True
.Shapes(PlayerRight).Visible = True
.Shapes("Stbd").Visible = True
.Visible = True
.Select
.Range(.Cells(1, 1), .Cells(17, 8)).Select
ActiveWindow.Zoom = True
.Cells(5, 3).Select
.Protect
End With
End Sub



New info: found this in Customise module:


Sub Customize()

Sheets("game").Visible = True
Sheets("game").Select
ActiveSheet.Unprotect


For Each photos In ActiveSheet.Shapes
photos.Visible = True
Next

m = MsgBox("Pour insérer une image, dans l'onglet INSERTION, clique sur IMAGES puis A PARTIR DU FICHIER... Après avoir selectionné ton image, clique droit dessus puis choisis FORMAT DE L'IMAGE. Dans l'onglet DIMENSION, definit la HAUTEUR à 5,6 et verifie que l'option PROPORTIONNEL soit coché. Il faut ensuite renommer l'image avec le nom exact de la personne (utilise le petit cadre à gauche de la barre de formule Excel). Il ne te reste plus qu'à remplacer le nom d'une des filles de l'onglet DATA par le nom de ton insertion. L'onglet GAME est alors automatiquement mis à jour. Bon jeu ! (PS : Tu peux supprimer la photo de la fille remplacée pour alléger le fichier)", vbInformation, "--= UltimateWorldCup Customization by Didier =--")

End Sub



Ok, so, need to find Activesheet.Shapes...
Didier says:
click insertion button, click images, find image.... so it seems that somewhere there's a customiser

Ok, it's a macro. run the customiser macro, this drops all the pictures on top of each other, half on the left and half on the right. delete them all one by one.
Next, insert your own images, format them to be 5.61cm high, 4.37cm high (take off maintain aspect ratio). rename them (with the name box, top left) & swap that name in for one of the original names on the list in the DATA sheet (name must match exactly)
When you've got 32 of your own pics stacked up on each side like the original lot were, and you've swapped out all the names, go for it.


- decyphering excel & looking at pictures of girls... that's what fridays were made for -
 
Upvote 0

Forum statistics

Threads
1,214,430
Messages
6,119,438
Members
448,897
Latest member
dukenia71

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