Excel random function











up vote
-1
down vote

favorite












I have a Excel problem:




  • I have 9 different numbers or letters (from 1 to 9 or a to i).

  • For each number I need to assign 1 number from remaining numbers (same number can not be assigned to itself for example 1 can not be assigned to 1).

  • Second requirement is that each number has to be used only 1 time.


I already tried 1 example from here with modification:



=IF(A1=A1, RANDBETWEEN(2, 9), RANDBETWEEN(2, 9))



Unfortunately this does not work for me and I suppose 1 more IF needs to be used.



Can anyone help me with Excel code?










share|improve this question
























  • What have you tried so far? Please update your question with your worked examples. Super User is not a script writing service. superuser.com/help/on-topic
    – spikey_richie
    Nov 21 at 8:52










  • I tryied only randombetween function but I am not able to use it with if function.
    – Jan Jesenius
    Nov 21 at 8:56










  • I'm voting to close this question as off-topic because questions must demonstrate a reasonable amount of research & understanding of the problem being solved. Please edit to either a) clearly describe your problem and the research done so far to solve it or b) include attempted solutions plus why they didn't work. In either case, be sure your expected results are clearly presented.
    – Tetsujin
    Nov 21 at 8:58






  • 1




    what is not clear from explanation of problem? I am just unable to solve it by myself.
    – Jan Jesenius
    Nov 21 at 8:59






  • 1




    Not homework (coursework). I have 9 users. Each user needs to draw another user for christmas gift. Thats all :-).
    – Jan Jesenius
    Nov 21 at 9:29















up vote
-1
down vote

favorite












I have a Excel problem:




  • I have 9 different numbers or letters (from 1 to 9 or a to i).

  • For each number I need to assign 1 number from remaining numbers (same number can not be assigned to itself for example 1 can not be assigned to 1).

  • Second requirement is that each number has to be used only 1 time.


I already tried 1 example from here with modification:



=IF(A1=A1, RANDBETWEEN(2, 9), RANDBETWEEN(2, 9))



Unfortunately this does not work for me and I suppose 1 more IF needs to be used.



Can anyone help me with Excel code?










share|improve this question
























  • What have you tried so far? Please update your question with your worked examples. Super User is not a script writing service. superuser.com/help/on-topic
    – spikey_richie
    Nov 21 at 8:52










  • I tryied only randombetween function but I am not able to use it with if function.
    – Jan Jesenius
    Nov 21 at 8:56










  • I'm voting to close this question as off-topic because questions must demonstrate a reasonable amount of research & understanding of the problem being solved. Please edit to either a) clearly describe your problem and the research done so far to solve it or b) include attempted solutions plus why they didn't work. In either case, be sure your expected results are clearly presented.
    – Tetsujin
    Nov 21 at 8:58






  • 1




    what is not clear from explanation of problem? I am just unable to solve it by myself.
    – Jan Jesenius
    Nov 21 at 8:59






  • 1




    Not homework (coursework). I have 9 users. Each user needs to draw another user for christmas gift. Thats all :-).
    – Jan Jesenius
    Nov 21 at 9:29













up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I have a Excel problem:




  • I have 9 different numbers or letters (from 1 to 9 or a to i).

  • For each number I need to assign 1 number from remaining numbers (same number can not be assigned to itself for example 1 can not be assigned to 1).

  • Second requirement is that each number has to be used only 1 time.


I already tried 1 example from here with modification:



=IF(A1=A1, RANDBETWEEN(2, 9), RANDBETWEEN(2, 9))



Unfortunately this does not work for me and I suppose 1 more IF needs to be used.



Can anyone help me with Excel code?










share|improve this question















I have a Excel problem:




  • I have 9 different numbers or letters (from 1 to 9 or a to i).

  • For each number I need to assign 1 number from remaining numbers (same number can not be assigned to itself for example 1 can not be assigned to 1).

  • Second requirement is that each number has to be used only 1 time.


I already tried 1 example from here with modification:



=IF(A1=A1, RANDBETWEEN(2, 9), RANDBETWEEN(2, 9))



Unfortunately this does not work for me and I suppose 1 more IF needs to be used.



Can anyone help me with Excel code?







microsoft-excel






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 21 at 10:28









Albin

2,2931129




2,2931129










asked Nov 21 at 8:50









Jan Jesenius

61




61












  • What have you tried so far? Please update your question with your worked examples. Super User is not a script writing service. superuser.com/help/on-topic
    – spikey_richie
    Nov 21 at 8:52










  • I tryied only randombetween function but I am not able to use it with if function.
    – Jan Jesenius
    Nov 21 at 8:56










  • I'm voting to close this question as off-topic because questions must demonstrate a reasonable amount of research & understanding of the problem being solved. Please edit to either a) clearly describe your problem and the research done so far to solve it or b) include attempted solutions plus why they didn't work. In either case, be sure your expected results are clearly presented.
    – Tetsujin
    Nov 21 at 8:58






  • 1




    what is not clear from explanation of problem? I am just unable to solve it by myself.
    – Jan Jesenius
    Nov 21 at 8:59






  • 1




    Not homework (coursework). I have 9 users. Each user needs to draw another user for christmas gift. Thats all :-).
    – Jan Jesenius
    Nov 21 at 9:29


















  • What have you tried so far? Please update your question with your worked examples. Super User is not a script writing service. superuser.com/help/on-topic
    – spikey_richie
    Nov 21 at 8:52










  • I tryied only randombetween function but I am not able to use it with if function.
    – Jan Jesenius
    Nov 21 at 8:56










  • I'm voting to close this question as off-topic because questions must demonstrate a reasonable amount of research & understanding of the problem being solved. Please edit to either a) clearly describe your problem and the research done so far to solve it or b) include attempted solutions plus why they didn't work. In either case, be sure your expected results are clearly presented.
    – Tetsujin
    Nov 21 at 8:58






  • 1




    what is not clear from explanation of problem? I am just unable to solve it by myself.
    – Jan Jesenius
    Nov 21 at 8:59






  • 1




    Not homework (coursework). I have 9 users. Each user needs to draw another user for christmas gift. Thats all :-).
    – Jan Jesenius
    Nov 21 at 9:29
















What have you tried so far? Please update your question with your worked examples. Super User is not a script writing service. superuser.com/help/on-topic
– spikey_richie
Nov 21 at 8:52




What have you tried so far? Please update your question with your worked examples. Super User is not a script writing service. superuser.com/help/on-topic
– spikey_richie
Nov 21 at 8:52












I tryied only randombetween function but I am not able to use it with if function.
– Jan Jesenius
Nov 21 at 8:56




I tryied only randombetween function but I am not able to use it with if function.
– Jan Jesenius
Nov 21 at 8:56












I'm voting to close this question as off-topic because questions must demonstrate a reasonable amount of research & understanding of the problem being solved. Please edit to either a) clearly describe your problem and the research done so far to solve it or b) include attempted solutions plus why they didn't work. In either case, be sure your expected results are clearly presented.
– Tetsujin
Nov 21 at 8:58




I'm voting to close this question as off-topic because questions must demonstrate a reasonable amount of research & understanding of the problem being solved. Please edit to either a) clearly describe your problem and the research done so far to solve it or b) include attempted solutions plus why they didn't work. In either case, be sure your expected results are clearly presented.
– Tetsujin
Nov 21 at 8:58




1




1




what is not clear from explanation of problem? I am just unable to solve it by myself.
– Jan Jesenius
Nov 21 at 8:59




what is not clear from explanation of problem? I am just unable to solve it by myself.
– Jan Jesenius
Nov 21 at 8:59




1




1




Not homework (coursework). I have 9 users. Each user needs to draw another user for christmas gift. Thats all :-).
– Jan Jesenius
Nov 21 at 9:29




Not homework (coursework). I have 9 users. Each user needs to draw another user for christmas gift. Thats all :-).
– Jan Jesenius
Nov 21 at 9:29










1 Answer
1






active

oldest

votes

















up vote
0
down vote













As there is no solution from anybody, I am sending one which works for me.
Maybe someone will need it in future.
However I am disappointed from answers to my question on this forum...



enter image description here



Solution






share|improve this answer























  • +1 Bravo for working it out, you didn't need out help after all :) but -1, you need to understand we're not here to work things out for you, you need to bring more to the table. I hope this experience hasn't put you off using SU again in the future.
    – spikey_richie
    Nov 21 at 14:16










  • Interesting because I found similar question here and below were direct answers without commnets. This is the reason why I am disappointed.
    – Jan Jesenius
    Nov 22 at 6:01











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1377210%2fexcel-random-function%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













As there is no solution from anybody, I am sending one which works for me.
Maybe someone will need it in future.
However I am disappointed from answers to my question on this forum...



enter image description here



Solution






share|improve this answer























  • +1 Bravo for working it out, you didn't need out help after all :) but -1, you need to understand we're not here to work things out for you, you need to bring more to the table. I hope this experience hasn't put you off using SU again in the future.
    – spikey_richie
    Nov 21 at 14:16










  • Interesting because I found similar question here and below were direct answers without commnets. This is the reason why I am disappointed.
    – Jan Jesenius
    Nov 22 at 6:01















up vote
0
down vote













As there is no solution from anybody, I am sending one which works for me.
Maybe someone will need it in future.
However I am disappointed from answers to my question on this forum...



enter image description here



Solution






share|improve this answer























  • +1 Bravo for working it out, you didn't need out help after all :) but -1, you need to understand we're not here to work things out for you, you need to bring more to the table. I hope this experience hasn't put you off using SU again in the future.
    – spikey_richie
    Nov 21 at 14:16










  • Interesting because I found similar question here and below were direct answers without commnets. This is the reason why I am disappointed.
    – Jan Jesenius
    Nov 22 at 6:01













up vote
0
down vote










up vote
0
down vote









As there is no solution from anybody, I am sending one which works for me.
Maybe someone will need it in future.
However I am disappointed from answers to my question on this forum...



enter image description here



Solution






share|improve this answer














As there is no solution from anybody, I am sending one which works for me.
Maybe someone will need it in future.
However I am disappointed from answers to my question on this forum...



enter image description here



Solution







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 21 at 13:48









Aulis Ronkainen

6051714




6051714










answered Nov 21 at 13:10









Jan Jesenius

61




61












  • +1 Bravo for working it out, you didn't need out help after all :) but -1, you need to understand we're not here to work things out for you, you need to bring more to the table. I hope this experience hasn't put you off using SU again in the future.
    – spikey_richie
    Nov 21 at 14:16










  • Interesting because I found similar question here and below were direct answers without commnets. This is the reason why I am disappointed.
    – Jan Jesenius
    Nov 22 at 6:01


















  • +1 Bravo for working it out, you didn't need out help after all :) but -1, you need to understand we're not here to work things out for you, you need to bring more to the table. I hope this experience hasn't put you off using SU again in the future.
    – spikey_richie
    Nov 21 at 14:16










  • Interesting because I found similar question here and below were direct answers without commnets. This is the reason why I am disappointed.
    – Jan Jesenius
    Nov 22 at 6:01
















+1 Bravo for working it out, you didn't need out help after all :) but -1, you need to understand we're not here to work things out for you, you need to bring more to the table. I hope this experience hasn't put you off using SU again in the future.
– spikey_richie
Nov 21 at 14:16




+1 Bravo for working it out, you didn't need out help after all :) but -1, you need to understand we're not here to work things out for you, you need to bring more to the table. I hope this experience hasn't put you off using SU again in the future.
– spikey_richie
Nov 21 at 14:16












Interesting because I found similar question here and below were direct answers without commnets. This is the reason why I am disappointed.
– Jan Jesenius
Nov 22 at 6:01




Interesting because I found similar question here and below were direct answers without commnets. This is the reason why I am disappointed.
– Jan Jesenius
Nov 22 at 6:01


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1377210%2fexcel-random-function%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Список кардиналов, возведённых папой римским Каликстом III

Deduzione

Mysql.sock missing - “Can't connect to local MySQL server through socket”