Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
Pisii din Ialomita
Femeie
24 ani
Ialomita
cauta Barbat
24 - 44 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [EXCEL] For Number Display Corresponding Month Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
TRaP
Moderator

Inregistrat: acum 6 ani
Postari: 787
Key words: curly brackets choose match months days array search find

I need a formula that takes the 2 rightmost characters from a cell, compares them to a static array list between curly brackets, then depending on which item was a match returns corresponding item from another static array list.

="luna " & IFERROR(CHOOSE(MATCH(RIGHT(N3; 2); {"01";"02";"03";"04";"05";"06";"07";"08";"09";"10";"11";"12"}; 0);
"IANUARIE"; "FEBRUARIE"; "MARTIE"; "APRILIE"; "MAI"; "IUNIE"; "IULIE"; "AUGUST"; "SEPTEMBRIE"; "OCTOMBRIE"; "NOIEMBRIE"; "DECEMBRIE"); 0)


So if the two rightmost charcters of N3 are 03, it will return Martie. If they are 08 it will return August. And so on.

Source:
ChatGPT


pus acum 8 luni
   
Mrrrr
AdMiN

Inregistrat: acum 18 ani
Postari: 2241
If the MATCH array for month number is a plain number like 1, 2, 3 etc., you can remove the " " in that array. In the example below N3 is also just a number, and the rightmost string of N3 is no longer required.

=IFERROR(CHOOSE(MATCH(N3; {1;2;3;4;5;6;7;8;9;10;11;12}; 0);
"ianuarie"; "februarie"; "martie"; "aprilie"; "mai"; "iunie"; "iulie"; "august"; "septembrie"; "octombrie"; "noiembrie"; "decembrie"); 0)


Or you can use SWITCH like in the video below, also to avoid nested IFs.
=SWITCH(N6;1;"Poor"; 2;"Below Average"; 3;"Average"; 4;"Good"; 5;"Excellent";"Not rated")

An alternative for his SWITCH is still the CHOOSE, MATCH above, used like this:
=IFERROR(CHOOSE(MATCH(N6; {1;2;3;4;5}; 0);"Poor"; "Below Average"; "Average"; "Good"; "Excellent"); "Not Rated")

But SWITCH is a tad shorter and easier to use.


_______________________________________


pus acum 8 luni
   
Pagini: 1  

Mergi la