Skip to main content
deleted 200 characters in body
Source Link
Taylor Raine
  • 8.8k
  • 2
  • 28
  • 51

Excel VBA, 81 Bytes

#Excel VBA, 81 76 Bytes

Anonymous VBE immediate window function that takes no input and outputs to the VBE Immediate Window

###Golfed

For i=-9To 8:For j=-8To 98:k=Absj=Abs(i)+Abs(j):l=l &IIfr=Mid(k>8," "987654321,9-kj+1):Next:?l:l=""Spc(j)StrReverse(r)Mid(r,2):Next

###Ungolfed##Old Version, 81 Bytes

Dim i As Integer, _ 
    j As Integer, _ 
    k As Integer, _
    l As String
For i = i=-9 To9To 8 Step 1
    :For j = j=-8 To8To 9 Step 1
        k = Abs:k=Abs(i) + Abs+Abs(j)
        l = l &:l=l IIf&IIf(k > 8k>8," ",9 - k)
    :Next j 
    Debug.Print l
    :?l = ""
:l="":Next i 

Excel VBA, 81 Bytes

Anonymous VBE immediate window function that takes no input and outputs to the VBE Immediate Window

###Golfed

For i=-9To 8:For j=-8To 9:k=Abs(i)+Abs(j):l=l &IIf(k>8," ",9-k):Next:?l:l="":Next

###Ungolfed

Dim i As Integer, _ 
    j As Integer, _ 
    k As Integer, _
    l As String
For i = -9 To 8 Step 1
    For j = -8 To 9 Step 1
        k = Abs(i) + Abs(j)
        l = l & IIf(k > 8," ",9 - k)
    Next j 
    Debug.Print l
    l = ""
Next i 

#Excel VBA, 81 76 Bytes

Anonymous VBE immediate window function that takes no input and outputs to the VBE Immediate Window

For i=-8To 8:j=Abs(i):r=Mid(987654321,j+1):?Spc(j)StrReverse(r)Mid(r,2):Next

##Old Version, 81 Bytes

For i=-9To 8:For j=-8To 9:k=Abs(i)+Abs(j):l=l &IIf(k>8," ",9-k):Next:?l:l="":Next
Formatting, Immediate window function
Source Link
Taylor Raine
  • 8.8k
  • 2
  • 28
  • 51

Excel VBA, 93 + 1 = 9481 Bytes

  

OutputsAnonymous VBE immediate window function that takes no input and outputs to the VBE ImmediatesImmediate Window

Sub a:For i=-9To 8:For j=-8To 9:k=Abs(i)+Abs(j):l=l &IIf(k>8," ",9-k):Next:Debug.?l:l="":Next

###Golfed

For i=-9To 8:For j=-8To 9:k=Abs(i)+Abs(j):l=l &IIf(k>8," ",9-k):Next:?l:l="":Next

+1 Byte for Trailing Enter Keystroke to end sub###Ungolfed

Dim i As Integer, _ 
    j As Integer, _ 
    k As Integer, _
    l As String
For i = -9 To 8 Step 1
    For j = -8 To 9 Step 1
        k = Abs(i) + Abs(j)
        l = l & IIf(k > 8," ",9 - k)
    Next j 
    Debug.Print l
    l = ""
Next i 

Excel VBA, 93 + 1 = 94 Bytes

 

Outputs to the VBE Immediates Window

Sub a:For i=-9To 8:For j=-8To 9:k=Abs(i)+Abs(j):l=l &IIf(k>8," ",9-k):Next:Debug.?l:l="":Next

+1 Byte for Trailing Enter Keystroke to end sub

Excel VBA, 81 Bytes

 

Anonymous VBE immediate window function that takes no input and outputs to the VBE Immediate Window

###Golfed

For i=-9To 8:For j=-8To 9:k=Abs(i)+Abs(j):l=l &IIf(k>8," ",9-k):Next:?l:l="":Next

###Ungolfed

Dim i As Integer, _ 
    j As Integer, _ 
    k As Integer, _
    l As String
For i = -9 To 8 Step 1
    For j = -8 To 9 Step 1
        k = Abs(i) + Abs(j)
        l = l & IIf(k > 8," ",9 - k)
    Next j 
    Debug.Print l
    l = ""
Next i 
Source Link
Taylor Raine
  • 8.8k
  • 2
  • 28
  • 51

Excel VBA, 93 + 1 = 94 Bytes

Outputs to the VBE Immediates Window

Sub a:For i=-9To 8:For j=-8To 9:k=Abs(i)+Abs(j):l=l &IIf(k>8," ",9-k):Next:Debug.?l:l="":Next

+1 Byte for Trailing Enter Keystroke to end sub