How can I create a matrix of 300 x 300 automatically in excel

Abdmujib

Board Regular
Joined
May 15, 2022
Messages
92
Office Version
  1. 365
Platform
  1. Windows
The Picture attached is a matrix of 10 X 10 (10 columns and 10 rows). I did it manually then and it was tedious. there is now a need to do at least 300 x 300. Pls is there a way to get it done easily without doing it manually.

Thanks




Note: The earlier post got deleted and I didn't understand the reason (Was deleted reasons: pls do not bump your tread with 24hrs, as it lessen your chance of getting help).
 

Attachments

  • 1660421548252.png
    1660421548252.png
    19.8 KB · Views: 17
  • 1660421731809.png
    1660421731809.png
    23.7 KB · Views: 20
Is there no way to do all the cells automatically at once
Can you please clarify:

- Which cells do you mean? The one matrix, the header numbers 0 to 300? Multiple matrices?
- Do you mean using VBA code?
- Or perhaps do you mean using the newer array formulae (if you have access to the latest versions of Excel, and not just Excel 2016)?
 
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
I meant instead of using the function to fill ten rows or columns at a time, is it possible to have a function that will do everything once.


Also is it posible to use vba?

Thirdly, pls do you have any material that can guide me on using Bivariate poisson on excel
 
Upvote 0
The earlier post got deleted and I didn't understand the reason
The reason was you bumped your thread after less than 30mins, which takes it of the "Unanswered threads" list thereby reducing you chance of getting help.

Also in future please do not duplicate your threads.
 
Upvote 0
Thanks I won't next time.

I got a notification (picture attached) that it was deleted and I didn't understand the reason. I googled the message to see if I could get what its meant, also I search around the pages if I could see FAQ and rules and regulations didn't get any. So I had no option than to post another thread. In fact I included a note in the thread that I didn't k ow why it was deleted.

Since I got notified that it was deleted, why is it still there. It means I'm not the only one to share the fault. The system is at fault too.

Pls kindly explain what you meant by "bump"?
Screenshot_20220814-132432_Chrome.jpg
thanks.
 
Upvote 0
So I had no option than to post another thread.
No you did not, your original thread still exists & you should have kept to that, rather than starting a new one.
I got a notification (picture attached) that it was deleted and I didn't understand the reason.
I just explained that in post#13
 
Upvote 0
It says it got deleted. Check the screenshot of the notification in the attached pic. It says " Your post in the thread Building Matrix of range of numbers was DELETED. Reason: Please do not bump your thread with 24hrs, as it lessens your chance of getting help"

Delete means only one thing, it does not exist anymore.

I haven't got what you meant by 'bumb', any synonyms?

Screenshot_20220814-132432_Chrome.jpg
 
Upvote 0
The message clearly says Your [B]post[/B] in the [B]thread [/B]Building Matrixthat means the post was deleted not the thread, if had followed the link in that notification you would have seen that.
Pls kindly explain what you meant by "bump"?
That is when you reply to your own thread before anybody else has.
 
Upvote 0
I meant instead of using the function to fill ten rows or columns at a time, is it possible to have a function that will do everything once.

Also is it posible to use vba?

I'm not sure what you mean by function?

You could do this entirely in VBA, and dump just the results to Excel, i.e. don't use Excel formulae.

Or you could use VBA to create the Excel formulae, which is what I've done below:

Before code:
ABCD
1Lambdas
2Home Team1.1
3Away Team0.9
4
5
6
7
Sheet1

After code:
Cell Formulas
RangeFormula
C5C5=SUM($C$9:$M$19)
C9:M19C9=POISSON.DIST(C$8,$C$3,)*POISSON.DIST($B9,$C$2,)*100

VBA Code:
Sub Test()

    Dim N As Long, i As Long, hdr() As Long
    
    N = 10
    ReDim hdr(0 To N)
    For i = 0 To N
        hdr(i) = i
    Next i
    
    With Worksheets("Sheet1").Range("C9")
        .Offset(-2).Value = "Away"
        .Offset(-1).Resize(, N + 1).Value = hdr
        .Offset(-1, -1).Value = "Home"
        .Offset(, -1).Resize(N + 1).Value = Application.Transpose(hdr)
        With .Resize(N + 1, N + 1)
            .FormulaR1C1 = "=POISSON.DIST(R" & .Row - 1 & "C,R3C3,)*POISSON.DIST(RC" & .Column - 1 & ",R2C3,)*100"
            .NumberFormat = "0.00"
            .Offset(-4, -1)(1).Value = "Total"
            .Offset(-4)(1).Formula = "=SUM(" & .Address & ")"
        End With
    End With
    
End Sub
Thirdly, pls do you have any material that can guide me on using Bivariate poisson on excel
I don't, sorry. I'd have to Google it.
 
Upvote 0

Forum statistics

Threads
1,215,706
Messages
6,126,340
Members
449,311
Latest member
accessbob

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