How to Make a Tartan Heart Image in Excel
Part 1 of 4:
Preparation
- Open a new Excel worksheet by opening the Excel application from the dock or Applications folder.
- Set Preferences: In General - Set Use R1C1 reference style to checked or On.
- Set column 1 to Format Column Width .5" and Format Row Height .25"
- Select Rows 2:200 and set Format Row Height to .06" (but see Tips).
- Select Columns 2:512 and set Format Column Width to .03" (but see Tips).
- Read through these steps and tips entirely before actually setting to work -- there's a time-consuming route (given first) and an easier way (via making a copy of the given macro) that will save a lot of time and effort! But to create your own tartan's pattern, you must be familiar with the concepts conveyed in the first part, starting with this next step:
- Obtain the actual tartan and, probably with the aid of a magnifying glass, write down the color and number of the threads across in columns and do the same down in rows. Be exact as you possibly can be, it's important in achieving the exact effect of really replicating the tartan, precisely. Here's a picture of a tartan closeup which had its threads counted.
Part 2 of 4:
Create the Onscreen Tartan Pattern
- Begin in column 2. Select the column. Make the color match the tartan's beginning thread color. Use the Color Wheel. Format Cells Fill the column (or to a designated row# stopping point) with the color.
- Then do row 2, selecting the row, and make the color match as closely as possible to the tartan's actual thread color. Use the Color Wheel. Format Cells Fill the row (or to a designated column# stopping point) with the color.
- Then do column 3, then row 3, then column 4, then row 4, etc., etc. continuing over and under this way until you've filled the screen with the full image of the tartan! Be patient with yourself and do the job right, although it may take you hours, or even days to finish. Working with the macros, however, takes much less time in the end.
Part 3 of 4:
Create the Shape-Filled Pattern
- Use the Grab application or do Copy Picture by using the Shift Key with Edit Copy and then do Paste Picture to a new worksheet by using the Shift Key again. Then, whether you used the Grab app, or Paste Picture, do Command+v, copy.
- Open the application Preview and do File, New from Clipboard.
- Export the file to the Desktop or into a new "Tartans XL Work" folder as a JPG file or PNG file format file and name the file "My XL Tartan Picture".
- Quit Preview.
- Click on Excel to activate it as the active application and choose the Media Tools icon along the very top of all the Tool Bars -- it has two tied piano notes in front and to the right of some images as its icon.
- Select from within the Media Tools window, Shapes, and select the Heart Shape, or whatever shape you'd like your tartan to be within.
- Click on a blank portion of the Excel worksheet, and a small heart (or the shape you've chosen) will appear.
- Re-size it as you prefer -- about 3" by 3" on the screen is probably about right.
- Do Format Shape Fill Picture and then choose the file, My XL Tartan Picture.jpg, to use as fill.
- Your image should resemble this one:
- Done! Well worth it, eh?
- Here is the macro code to create the tartan. You use Advanced Editing to copy All the code to Word and do a Replace All of "#* " with nothing, and the code will result, which you can then paste into over a Visual Basic dummy macro you recorded that was meaningless. Read on first, however.
- Note: In Sub Macro2(), at the end, there are some Directory path names in code lines which need to be changed to match your computer, please. You can find out what these are by recording a macro to save a file into the folder where you plan to save the tartan work and tartan macro.
- It is suggested that you make a text copy of any modifications you make to the macro and store them in a Word file to the same folder, for example if you modify the code to make a different tartan than the Anderson tartan.
- Remember, you can always broaden the columns and row heights to get a better look at what's what in terms of thread count relative to the vertical looping down the rows in Sub Macro3().
- OK. Before you can access the Visual Basic Editor, you'll need to go to Excel Preferences and set the Ribbon to checked for Developer. Then Developer will appear on your Ribbon and when you click on it, you'll see the Record icon button.
- When you record the dummy macro, e.g. Macro1 say, before its end, perhaps overwriting the dummy recorded code, type in Macro2. That will call this Macro2 below, which you've copied in and pasted below Macro1. You therefore can RUN either Macro2 or Macro1 and accomplish the same effect -- completion of the tartan! :D
Part 4 of 4:
The Tartan Macro Code
-
- Sub Macro2()
- ' Macro2 Macro
- 'Anderson Tartan Columns - Left to right
- Application.ScreenUpdating = True
- Workbooks.Add
- Range("B:SQ").Select
- Selection.ColumnWidth = 1.5
- Range("B1:O376").Select
- Range("B1:O376").Interior.Color = RGB(100, 149, 237)
- Range("P1:U376").Select
- Range("P1:U376").Interior.Color = RGB(0, 0, 0)
- Range("V1:AA376").Select
- Range("V1:AA376").Interior.Color = RGB(190, 190, 190)
- Range("AB1:AE376").Select
- Range("AB1:AE376").Interior.Color = RGB(0, 0, 0)
- Range("AF1:AI376").Select
- Range("AF1:AI376").Interior.Color = RGB(255, 255, 0)
- Range("AJ1:AM376").Select
- Range("AJ1:AM376").Interior.Color = RGB(0, 0, 0)
- Range("AN1:AQ376").Select
- Range("AN1:AQ376").Interior.Color = RGB(255, 255, 0)
- Range("AR1:AW376").Select
- Range("AR1:AW376").Interior.Color = RGB(0, 0, 0)
- Range("AX1:BA376").Select
- Range("AX1:BA376").Interior.Color = RGB(255, 0, 0)
- Range("BB1:BG376").Select
- Range("BB1:BG376").Interior.Color = RGB(0, 0, 255)
- Range("BH1:BI376").Select
- Range("BH1:BI376").Interior.Color = RGB(255, 0, 0)
- Range("BJ1:BQ376").Select
- Range("BJ1:BQ376").Interior.Color = RGB(46, 139, 87)
- Range("BR1:BT376").Select
- Range("BR1:BT376").Interior.Color = RGB(255, 0, 0)
- Range("BU1:CB376").Select
- Range("BU1:CB376").Interior.Color = RGB(46, 139, 87)
- Range("CC1:CF376").Select
- Range("CC1:CF376").Interior.Color = RGB(255, 0, 0)
- Range("CG1:CN376").Select
- Range("CG1:CN376").Interior.Color = RGB(46, 139, 87)
- Range("CO1:CR376").Select
- Range("CO1:CR376").Interior.Color = RGB(255, 0, 0)
- Range("CS1:CZ376").Select
- Range("CS1:CZ376").Interior.Color = RGB(46, 139, 87)
- Range("DA1:DB376").Select
- Range("DA1:DB376").Interior.Color = RGB(255, 0, 0)
- Range("DC1:DH376").Select
- Range("DC1:DH376").Interior.Color = RGB(0, 0, 255)
- Range("DI1:DL376").Select
- Range("DI1:DL376").Interior.Color = RGB(255, 0, 0)
- Range("DM1:DP376").Select
- Range("DM1:DP376").Interior.Color = RGB(0, 0, 0)
- Range("DQ1:DT376").Select
- Range("DQ1:DT376").Interior.Color = RGB(255, 255, 0)
- Range("DU1:DX376").Select
- Range("DU1:DX376").Interior.Color = RGB(0, 0, 0)
- Range("DY1:EB376").Select
- Range("DY1:EB376").Interior.Color = RGB(255, 255, 0)
- Range("EC1:EF376").Select
- Range("EC1:EF376").Interior.Color = RGB(0, 0, 0)
- Range("EG1:EL376").Select
- Range("EG1:EL376").Interior.Color = RGB(190, 190, 190)
- Range("EM1:ER376").Select
- Range("EM1:ER376").Interior.Color = RGB(0, 0, 0)
- Range("ES1:FF376").Select
- Range("ES1:FF376").Interior.Color = RGB(100, 149, 237)
- Range("FG1:FG376").Select
- Range("FG1:FG376").Interior.Color = RGB(255, 0, 0)
- Range("FH1:FK376").Select
- Range("FH1:FK376").Interior.Color = RGB(0, 0, 0)
- Range("FL1:FL376").Select
- Range("FL1:FL376").Interior.Color = RGB(255, 0, 0)
- Range("FM1:FR376").Select
- Range("FM1:FR376").Interior.Color = RGB(100, 149, 237)
- Range("FS1:FX376").Select
- Range("FS1:FX376").Interior.Color = RGB(255, 0, 0)
- Range("FY1:GD376").Select
- Range("FY1:GD376").Interior.Color = RGB(100, 149, 237)
- Range("GE1:GE376").Select
- Range("GE1:GE376").Interior.Color = RGB(255, 0, 0)
- Range("GF1:GI376").Select
- Range("GF1:GI376").Interior.Color = RGB(0, 0, 0)
- Range("GJ1:GJ376").Select
- Range("GJ1:GJ376").Interior.Color = RGB(255, 0, 0)
- Range("GK1:GX376").Select
- Range("GK1:GX376").Interior.Color = RGB(100, 149, 237)
- Range("GY1:HB376").Select
- Range("GY1:HB376").Interior.Color = RGB(0, 0, 0)
- Range("HC1:HH376").Select
- Range("HC1:HH376").Interior.Color = RGB(190, 190, 190)
- Range("HI1:HL376").Select
- Range("HI1:HL376").Interior.Color = RGB(0, 0, 0)
- Range("HM1:HP376").Select
- Range("HM1:HP376").Interior.Color = RGB(255, 255, 0)
- Range("HQ1:HT376").Select
- Range("HQ1:HT376").Interior.Color = RGB(0, 0, 0)
- Range("HU1:HX376").Select
- Range("HU1:HX376").Interior.Color = RGB(255, 255, 0)
- Range("HY1:ID376").Select
- Range("HY1:ID376").Interior.Color = RGB(0, 0, 0)
- Range("IE1:IH376").Select
- Range("IE1:IH376").Interior.Color = RGB(255, 0, 0)
- Range("II1:IN376").Select
- Range("II1:IN376").Interior.Color = RGB(0, 0, 255)
- Range("IO1:IP376").Select
- Range("IO1:IP376").Interior.Color = RGB(255, 0, 0)
- Range("IQ1:IV376").Select
- Range("IQ1:IV376").Interior.Color = RGB(46, 139, 87)
- Range("IW1:JJ376").Select
- Range("IW1:JJ376").Interior.Color = RGB(100, 149, 237)
- Range("JK1:JP376").Select
- Range("JK1:JP376").Interior.Color = RGB(0, 0, 0)
- Range("JQ1:JV376").Select
- Range("JQ1:JV376").Interior.Color = RGB(190, 190, 190)
- Range("JW1:JZ376").Select
- Range("JW1:JZ376").Interior.Color = RGB(0, 0, 0)
- Range("KA1:KD376").Select
- Range("KA1:KD376").Interior.Color = RGB(255, 255, 0)
- Range("KE1:KH376").Select
- Range("KE1:KH376").Interior.Color = RGB(0, 0, 0)
- Range("KI1:KL376").Select
- Range("KI1:KL376").Interior.Color = RGB(255, 255, 0)
- Range("KM1:KR376").Select
- Range("KM1:KR376").Interior.Color = RGB(0, 0, 0)
- Range("KS1:KV376").Select
- Range("KS1:KV376").Interior.Color = RGB(255, 0, 0)
- Range("KW1:LB376").Select
- Range("KW1:LB376").Interior.Color = RGB(0, 0, 255)
- Range("LC1:LD376").Select
- Range("LC1:LD376").Interior.Color = RGB(255, 0, 0)
- Range("LE1:LL376").Select
- Range("LE1:LL376").Interior.Color = RGB(46, 139, 87)
- Range("LM1:LO376").Select
- Range("LM1:LO376").Interior.Color = RGB(255, 0, 0)
- Range("LP1:LW376").Select
- Range("LP1:LW376").Interior.Color = RGB(46, 139, 87)
- Range("LX1:MA376").Select
- Range("LX1:MA376").Interior.Color = RGB(255, 0, 0)
- Range("MB1:MI376").Select
- Range("MB1:MI376").Interior.Color = RGB(46, 139, 87)
- Range("MJ1:MM376").Select
- Range("MJ1:MM376").Interior.Color = RGB(255, 0, 0)
- Range("MN1:MU376").Select
- Range("MN1:MU376").Interior.Color = RGB(46, 139, 87)
- Range("MV1:MW376").Select
- Range("MV1:MW376").Interior.Color = RGB(255, 0, 0)
- Range("MX1:NC376").Select
- Range("MX1:NC376").Interior.Color = RGB(0, 0, 255)
- Range("ND1:NG376").Select
- Range("ND1:NG376").Interior.Color = RGB(255, 0, 0)
- Range("NH1:NK376").Select
- Range("NH1:NK376").Interior.Color = RGB(0, 0, 0)
- Range("NL1:NO376").Select
- Range("NL1:NO376").Interior.Color = RGB(255, 255, 0)
- Range("NP1:NS376").Select
- Range("NP1:NS376").Interior.Color = RGB(0, 0, 0)
- Range("NT1:NW376").Select
- Range("NT1:NW376").Interior.Color = RGB(255, 255, 0)
- Range("NX1:OA376").Select
- Range("NX1:OA376").Interior.Color = RGB(0, 0, 0)
- Range("OB1:OG376").Select
- Range("OB1:OG376").Interior.Color = RGB(190, 190, 190)
- Range("OH1:OM376").Select
- Range("OH1:OM376").Interior.Color = RGB(0, 0, 0)
- Range("ON1:PA376").Select
- Range("ON1:PA376").Interior.Color = RGB(100, 149, 237)
- Range("PB1:PB376").Select
- Range("PB1:PB376").Interior.Color = RGB(255, 0, 0)
- Range("PC1:PF376").Select
- Range("PC1:PF376").Interior.Color = RGB(0, 0, 0)
- Range("PG1:PG376").Select
- Range("PG1:PG376").Interior.Color = RGB(255, 0, 0)
- Range("PH1:PM376").Select
- Range("PH1:PM376").Interior.Color = RGB(100, 149, 237)
- Range("PN1:PS376").Select
- Range("PN1:PS376").Interior.Color = RGB(255, 0, 0)
- Range("PT1:PY376").Select
- Range("PT1:PY376").Interior.Color = RGB(100, 149, 237)
- Range("PZ1:PZ376").Select
- Range("PZ1:PZ376").Interior.Color = RGB(255, 0, 0)
- Range("QA1:QD376").Select
- Range("QA1:QD376").Interior.Color = RGB(0, 0, 0)
- Range("QE1:QE376").Select
- Range("QE1:QE376").Interior.Color = RGB(255, 0, 0)
- Range("QF1:QS376").Select
- Range("QF1:QS376").Interior.Color = RGB(100, 149, 237)
- Range("QT1:QW376").Select
- Range("QT1:QW376").Interior.Color = RGB(0, 0, 0)
- Range("QX1:RC376").Select
- Range("QX1:RC376").Interior.Color = RGB(190, 190, 190)
- Range("RD1:RG376").Select
- Range("RD1:RG376").Interior.Color = RGB(0, 0, 0)
- Range("RH1:RK376").Select
- Range("RH1:RK376").Interior.Color = RGB(255, 255, 0)
- Range("RL1:RO376").Select
- Range("RL1:RO376").Interior.Color = RGB(0, 0, 0)
- Range("RP1:RS376").Select
- Range("RP1:RS376").Interior.Color = RGB(255, 255, 0)
- Range("RT1:RY376").Select
- Range("RT1:RY376").Interior.Color = RGB(0, 0, 0)
- Range("RZ1:SC376").Select
- Range("RZ1:SC376").Interior.Color = RGB(255, 0, 0)
- Range("SD1:SI376").Select
- Range("SD1:SI376").Interior.Color = RGB(0, 0, 255)
- Range("SJ1:SK376").Select
- Range("SJ1:SK376").Interior.Color = RGB(255, 0, 0)
- Range("SL1:SQ376").Select
- Range("SL1:SQ376").Interior.Color = RGB(46, 139, 87)
- ChDir _
- "Macintosh HD:Users:chrisgarthwaite:Documents:Excel ƒ: Hubs and SITES:wikiHow's:"
- Range("SL1:SQ376").Select
- ActiveWorkbook.SaveAs Filename:= _
- "Macintosh HD:Users:chrisgarthwaite:Documents:Excel ƒ:Tartan Work: Anderson Tartan Development.xlsx" _
- , FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
- Macro1_Vertical_Row_Sampler
- End Sub
- Sub Macro1_Vertical_Row_Sampler()
- '
- ' Macro1_Vertical_Row_Sampler Macro
- ' Vertical Row Sampler
- ' Top to bottom
- Range("A2").Select
- ActiveWorkbook.Names.Add Name:="Tartan_Vertical_StarterCell", RefersToR1C1 _
- :="=Sheet1!R2C1"
- Range("A1:A210").Select
- Selection.RowHeight = 18
- Range("A2:A10").Select
- Range("A2").Interior.Color = RGB(0, 0, 0)
- Range("A11:A16").Select
- Range("A11").Interior.Color = RGB(255, 0, 0)
- Range("A17:A23").Select
- Range("A17").Interior.Color = RGB(0, 0, 0)
- Range("A24:A29").Select
- Range("A24").Interior.Color = RGB(255, 0, 0)
- Range("A30:A36").Select
- Range("A30").Interior.Color = RGB(0, 0, 0)
- Range("A37:A38").Select
- Range("A37").Interior.Color = RGB(255, 0, 0)
- Range("A39:A42").Select
- Range("A39").Interior.Color = RGB(0, 0, 255)
- Range("A43:A44").Select
- Range("A43").Interior.Color = RGB(255, 0, 0)
- Range("A45:A48").Select
- Range("A45").Interior.Color = RGB(0, 0, 0)
- Range("A49").Select
- Range("A49").Interior.Color = RGB(255, 255, 0)
- Range("A50").Select
- Range("A50").Interior.Color = RGB(0, 0, 0)
- Range("A51").Select
- Range("A51").Interior.Color = RGB(255, 255, 0)
- Range("A52:A55").Select
- Range("A52").Interior.Color = RGB(0, 0, 0)
- Range("A56:A59").Select
- Range("A56").Interior.Color = RGB(224, 255, 255)
- Range("A60:A65").Select
- Range("A60").Interior.Color = RGB(0, 0, 0)
- Range("A66:A85").Select
- Range("A66").Interior.Color = RGB(0, 255, 255)
- Range("A86:A87").Select
- Range("A86").Interior.Color = RGB(255, 0, 0)
- Range("A88:A91").Select
- Range("A88").Interior.Color = RGB(0, 0, 0)
- Range("A92:A93").Select
- Range("A92").Interior.Color = RGB(255, 0, 0)
- Range("A94:A101").Select
- Range("A94").Interior.Color = RGB(0, 255, 255)
- Range("A102:A107").Select
- Range("A102").Interior.Color = RGB(255, 0, 0)
- Range("A108:A115").Select
- Range("A108").Interior.Color = RGB(0, 255, 255)
- Range("A116:A117").Select
- Range("A116").Interior.Color = RGB(255, 0, 0)
- Range("A118:A121").Select
- Range("A118").Interior.Color = RGB(0, 0, 0)
- Range("A122:A123").Select
- Range("A122").Interior.Color = RGB(255, 0, 0)
- Range("A124:A143").Select
- Range("A124").Interior.Color = RGB(0, 255, 255)
- Range("A144:A149").Select
- Range("A144").Interior.Color = RGB(0, 0, 0)
- Range("A150:A153").Select
- Range("A150").Interior.Color = RGB(224, 255, 255)
- Range("A154:A157").Select
- Range("A154").Interior.Color = RGB(0, 0, 0)
- Range("A158").Select
- Range("A158").Interior.Color = RGB(255, 255, 0)
- Range("A159").Select
- Range("A159").Interior.Color = RGB(0, 0, 0)
- Range("A160").Select
- Range("A160").Interior.Color = RGB(255, 255, 0)
- Range("A161:A164").Select
- Range("A161").Interior.Color = RGB(0, 0, 0)
- Range("A165:A166").Select
- Range("A165").Interior.Color = RGB(255, 0, 0)
- Range("A167:A170").Select
- Range("A167").Interior.Color = RGB(0, 0, 255)
- Range("A171:A172").Select
- Range("A171").Interior.Color = RGB(255, 0, 0)
- Range("A173:A179").Select
- Range("A173").Interior.Color = RGB(0, 0, 0)
- Range("A180:A185").Select
- Range("A180").Interior.Color = RGB(255, 0, 0)
- Range("A186:A192").Select
- Range("A186").Interior.Color = RGB(0, 0, 0)
- Range("A193:A198").Select
- Range("A193").Interior.Color = RGB(255, 0, 0)
- Range("A199:A205").Select
- Range("A199").Interior.Color = RGB(0, 0, 0)
- Range("A206").Select
- ActiveCell.FormulaR1C1 = "End"
- ActiveWorkbook.Save
- Application.ScreenUpdating = False
- Macro3
- End Sub
- Sub Macro3()
- ' Macro3 Macro
- Windows(" Anderson Tartan Development.xlsx").Activate
- Application.Goto Reference:="Tartan_Vertical_StarterCell"
- 'Make the first 9 rows black
- Macro6
- For X03 = 1 To 7
- Macro8
- Next
- 10 Application.CutCopyMode = False
- 'Make the next 6 rows red
- Macro7
- For X03 = 1 To 4
- Macro8
- Next
- 30 Application.CutCopyMode = False
- 'Make the next 7 rows black
- Macro7
- For X03 = 1 To 5
- Macro8
- Next
- 50 Application.CutCopyMode = False
- 'Make the next 6 rows red
- Macro6
- For X03 = 1 To 4
- Macro8
- Next
- 70 Application.CutCopyMode = False
- 'Make the next 7 rows black
- Macro6
- For X03 = 1 To 5
- Macro8
- Next
- 90 Application.CutCopyMode = False
- 'Make the next 2 rows red
- Macro6
- 100 Application.CutCopyMode = False
- 'Make the next 4 rows blue-purple�
- Macro6
- For X03 = 1 To 2
- Macro8
- Next
- 130 Application.CutCopyMode = False
- 'Make the next 2 rows red
- Macro6
- 140 Application.CutCopyMode = False
- 'Make the next 4 rows black
- Macro6
- For X03 = 1 To 2
- Macro8
- Next
- 170 Application.CutCopyMode = False
- 'Make the next SINGLE ROW yellow
- Selection.Copy
- ActiveCell.Offset(0, 1).Select
- ActiveSheet.Paste
- 180 For X01 = 1 To 255
- ActiveCell.Offset(0, 2).Select
- ActiveSheet.Paste
- Next
- ActiveCell.Offset(1, -511).Select
- 190 Application.CutCopyMode = False
- 'Make the next SINGLE ROW black
- Selection.Copy
- ActiveCell.Offset(0, 2).Select
- ActiveSheet.Paste
- 200 For X01 = 1 To 255
- ActiveCell.Offset(0, 2).Select
- ActiveSheet.Paste
- Next
- ActiveCell.Offset(1, -512).Select
- 210 Application.CutCopyMode = False
- 'Make the next SINGLE ROW yellow
- Selection.Copy
- ActiveCell.Offset(0, 1).Select
- ActiveSheet.Paste
- 220 For X01 = 1 To 255
- ActiveCell.Offset(0, 2).Select
- ActiveSheet.Paste
- Next
- ActiveCell.Offset(1, -511).Select
- 230 Application.CutCopyMode = False
- 'Make the next 4 rows black
- Macro6
- For X03 = 1 To 2
- Macro8
- Next
- 270 Application.CutCopyMode = False
- 'Make the next 4 rows white
- Macro7
- For X03 = 1 To 2
- Macro8
- Next
- 280 Application.CutCopyMode = False
- 'Make the next 6 rows black
- Macro6
- For X03 = 1 To 4
- Macro8
- Next
- 290 Application.CutCopyMode = False
- 'Make the next 20 rows blue-green
- Macro6
- For X03 = 1 To 18
- Macro8
- Next
- 310 Application.CutCopyMode = False
- 'Make the next 2 rows red
- Macro6
- 320 Application.CutCopyMode = False
- 'Make the next 4 rows black
- Macro6
- For X03 = 1 To 2
- Macro8
- Next
- 350 Application.CutCopyMode = False
- 'Make the next 2 rows red
- Macro6
- 360 Application.CutCopyMode = False
- 'Make the next 8 rows blue-green
- Macro6
- For X03 = 1 To 6
- Macro8
- Next
- 410 Application.CutCopyMode = False
- 'Make the next 6 rows red
- Macro6
- For X03 = 1 To 4
- Macro8
- Next
- 430 Application.CutCopyMode = False
- Macro6
- For X03 = 1 To 6
- Macro8
- Next
- 450 Application.CutCopyMode = False
- 'Make the next 2 rows red
- Macro6
- 470 Application.CutCopyMode = False
- 'Make the next 4 rows black
- Macro6
- For X03 = 1 To 2
- Macro8
- Next
- 490 Application.CutCopyMode = False
- 'Make the next 2 rows red
- Macro6
- 500 Application.CutCopyMode = False
- 'Make the next 20 rows blue-green
- Macro6
- For X03 = 1 To 18
- Macro8
- Next
- 530 Application.CutCopyMode = False
- 'Make the next 6 rows black
- Macro6
- For X03 = 1 To 4
- Macro8
- Next
- 550 Application.CutCopyMode = False
- 'Make the next 4 rows white
- Macro6
- For X03 = 1 To 2
- Macro8
- Next
- 570 Application.CutCopyMode = False
- 'Make the next 4 rows black
- Macro6
- For X03 = 1 To 2
- Macro8
- Next
- 590 Application.CutCopyMode = False
- 'Make the next SINGLE ROW yellow
- Selection.Copy
- 600 For X01 = 1 To 255
- ActiveCell.Offset(0, 2).Select
- ActiveSheet.Paste
- Next
- ActiveCell.Offset(1, -510).Select
- 610 Application.CutCopyMode = False
- 'Make the next SINGLE ROW black
- Selection.Copy
- ActiveCell.Offset(0, 1).Select
- ActiveSheet.Paste
- 620 For X01 = 1 To 255
- ActiveCell.Offset(0, 2).Select
- ActiveSheet.Paste
- Next
- ActiveCell.Offset(1, -511).Select
- 630 Application.CutCopyMode = False
- 'Make the next SINGLE ROW yellow
- Selection.Copy
- 640 For X01 = 1 To 255
- ActiveCell.Offset(0, 2).Select
- ActiveSheet.Paste
- Next
- ActiveCell.Offset(1, -510).Select
- 650 Application.CutCopyMode = False
- 'Make the next 4 rows black
- Macro7
- For X03 = 1 To 2
- Macro8
- Next
- 670 Application.CutCopyMode = False
- 'Make the next 2 rows red
- Macro6
- 690 Application.CutCopyMode = False
- 'Make the next 4 rows blue-purple
- Macro7
- For X03 = 1 To 2
- Macro8
- Next
- 740 Application.CutCopyMode = False
- 'Make the next 2 rows red
- Macro6
- 750 Application.CutCopyMode = False
- 'Make the next 7 rows black
- Macro7
- For X03 = 1 To 5
- Macro8
- Next
- 780 Application.CutCopyMode = False
- 'Make the next 6 rows red
- Macro6
- For X03 = 1 To 4
- Macro8
- Next
- 800 Application.CutCopyMode = False
- 'Make the next 7 rows black
- Macro6
- For X03 = 1 To 5
- Macro8
- Next
- 820 Application.CutCopyMode = False
- 'Make the next 6 rows red
- Macro7
- For X03 = 1 To 4
- Macro8
- Next
- 840 Application.CutCopyMode = False
- 'Make the next (the last) 7 rows black
- Macro7
- For X03 = 1 To 5
- Macro8
- Next
- 870 Application.CutCopyMode = False
- Columns("B:SQ").Select
- Range("B178").Activate
- Selection.ColumnWidth = 0.18
- Rows("2:205").Select
- Range("A205").Activate
- Selection.RowHeight = 4
- Macro11
- ActiveWorkbook.SaveAs Filename:= _
- "Macintosh HD:Users:chrisgarthwaite:Documents:Excel ƒ:Tartan Work: Anderson Tartan Development.xlsm" _
- , FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
- End Sub
- Sub Macro6()
- ' Macro6 Macro
- Selection.Copy
- 0 For X01 = 1 To 255
- ActiveCell.Offset(0, 2).Select
- ActiveSheet.Paste
- Next
- ActiveCell.Offset(1, -510).Select
- ActiveSheet.Paste
- ActiveCell.Offset(0, 1).Select
- ActiveSheet.Paste
- For X02 = 1 To 255
- ActiveCell.Offset(0, 2).Select
- ActiveSheet.Paste
- Next
- ActiveCell.Offset(1, -511).Select
- End Sub
- Sub Macro7()
- ' Macro7 Macro
- Selection.Copy
- ActiveCell.Offset(0, 1).Select
- ActiveSheet.Paste
- 20 For X01 = 1 To 255
- ActiveCell.Offset(0, 2).Select
- ActiveSheet.Paste
- Next
- ActiveCell.Offset(1, -511).Select
- ActiveSheet.Paste
- For X02 = 1 To 255
- ActiveCell.Offset(0, 2).Select
- ActiveSheet.Paste
- Next
- ActiveCell.Offset(1, -510).Select
- ActiveSheet.Paste
- End Sub
- Sub Macro8()
- ' Macro8 Macro
- ActiveCell.Offset(-2, 510).Select
- ActiveWorkbook.Names.Add Name:="RightEnd", RefersToR1C1:=ActiveCell
- ActiveCell.Offset(2, -510).Select
- ActiveCell.Offset(-2, 0).Select
- ActiveWorkbook.Names.Add Name:="LeftEnd", RefersToR1C1:=ActiveCell
- Application.Goto Reference:="LeftEnd: RightEnd"
- Selection.Copy
- ActiveCell.Offset(2, 0).Select
- ActiveSheet.Paste
- ActiveCell.Offset(1, 0).Select
- ActiveWorkbook.Save
- End Sub
- Sub Macro11()
- ' Macro11 Macro
- Columns("A:A").Select
- Selection.Copy
- Columns("SR:SR").Select
- ActiveSheet.Paste
- Columns("SS:SS").Select
- Application.CutCopyMode = False
- Selection.Delete Shift:=xlToLeft
- Range("A1").Select
- End Sub
- Be patient, please. The macro can take anywhere from 3.5 minutes to a half hour or more to run, depending on your processor (speed). The code could have been written to run quicker but it would have been less easy to understand. The line numbers are there to break up the code between different colors; a long section of code actually goes from what would be Line 841 to Line 870, typically. There are shorter sections where there were only single or double threads (otherwise, looping was used, so the max loop value for the last X03 of 5 means that there are 5+2 = 7 rows or threads in the last weft section of black. It is black because of Macro3 leaving the top cell of the 7 black. The first two rows have every other cell pasted from this origin cell; after that, the entire done rows are copied and pasted below per the X03 loop, which is much quicker. They are only done singly, however, as multiples would get confusing, given that the tartan is very inconsistent in how many threads per weft section there are, actually. That said, the macro is so very much faster than doing it manually, there is just No Comparison!!
- Final image:
4 ★ | 1 Vote
You should read it
- The terminology of color, wheel color and skill used to color
- Macromedia Flash - RGB color slider
- Coreldraw 12: Sports car painting
- What is the profile color?
- Set background color in PowerPoint
- Which screen parameters are completely meaningless?
- Format background color for text page in Word
- CSS color coding, standard color code in website design
May be interested
- Instructions on how to measure heart rate at homein this article, tipsmake.com will share with readers how to measure heart rate at home to be more proactive in monitoring and assessing your health.
- Patching heart defects with new biological materialsa new medical discovery used to patch the heart tissue of defects has been successfully implemented and received the attention of the medical community worldwide.
- Drop Facebook's heart, add a heart effect on Facebook to Hali, XOXOfacebook has updated its unique 'heart attack' effect when users comment or status writing has 2 hali and xoxo words. soon after, the facebook interface will be flooded with flying hearts.
- MS Excel 2007 - Lesson 9: Insert images and graphics into a spreadsheetinsert images, clip art, shape, and smartart into spreadsheets to make the data sheet more vivid and intuitive. adding images or other graphic objects in excel 2007 is quite simple, as long as you know where the extra commands are located on the menu. see the instructions for inserting graphics into excel 2007 spreadsheets below.
- Instructions for cropping images in Excel are very simplewhen inserting an image into excel, you have the option to crop the image to select only the area of the image you want to take. in case the image is large, covers the content or you only want to take a certain area of the image, just select the crop tool in excel.
- Reducing heart hormone may limit death from heart failurereducing the level of heart hormones commonly known as type b neuronal peptide or also called bnp produced in the heart can significantly reduce the rate of heart failure and reduce the risk of death in heart patients. all are shown in a new study.
- The 25 interesting facts about HEART may not be known to youdid you know when a choir chooses to sing, their hearts beat at the same beat? here are 25 interesting facts about heart you may not know.
- 5 useful Microsoft Excel formulas for calculating taxesyou can spend big money to hire an experienced accountant handles this, or make use of excel power immediately to arrange things in order. here are five recipes that can make your life 'breathable' than in 'season' tax.
- Instructions for measuring heart rate by phone camerano need for expensive heart rate devices, users can still monitor their heart rate correctly by instant heart rate application on smart phones.
- How to survive a heart attack alone?the first sign of identification is central or left chest pain, calmly taking an aspirin tablet, putting pressure on the heart, coughing repeatedly and trying to call for relief ... to survive the second. dangerous minute of heart attack.