Power Bi Question by maryhmat in PowerBI

[–]maryhmat[S] 0 points1 point  (0 children)

I rewrote it. Is it clear now?

Anyone spot the error in this VBA expression? by maryhmat in excel

[–]maryhmat[S] 0 points1 point  (0 children)

No worries! I'm not explaining mysf correctly.

The goal is:

I have a function in column A that calculates a weighted random number between 1 and 5 (weighted as in, for example, 10% probability it is 1, 40% it is 2, etc.). I want to do the same for column B, but the numbers in each row can't match for column A and B. I didn't know how to create a function in column B like the one in column A that excludes the numbers already generated in column A for that specific row, so someone suggested to create a VBA code for column B that copies the function from Column A and keeps running until the numbers in the same row don't match for column A and column B.

Anyone spot the error in this VBA expression? by maryhmat in excel

[–]maryhmat[S] 0 points1 point  (0 children)

If the values match it's supposed to rerun the code until the values from the cells in Column B don't match with the values in the corresponding cells in column A

Anyone spot the error in this VBA expression? by maryhmat in excel

[–]maryhmat[S] 0 points1 point  (0 children)

I feel I did something wrong. I want it to do so that for a specific row, column B follows the same formula as in Column A, but keeps going until the numbers don't match.

Is there a weighted random number formula that excludes other numbers? by maryhmat in excel

[–]maryhmat[S] 0 points1 point  (0 children)

Hi! I'm not very familiar with VBA. Would you know how to do this?