text2<\/strong>– Second range or text value.<\/strong><\/li>\n<\/ul>\n\n\n\nWe will prepare the names of the player and define the column points:<\/p>\n\n\n\n <\/figure>\n\n\n\nOur formula in cell K2<\/strong> will be:<\/p>\n\n\n\n=TEXTJOIN(\", \",TRUE,IF(J2=$A$2:$A$28,$D$2:$D$28,\"\"))<\/code><\/pre>\n\n\n\nIn this formula, we first define our delimiter to be comma and space, i.e. \u201c, \u201d.<\/strong><\/p>\n\n\n\nThen we, choose TRUE<\/strong> for ignoring empty cells.<\/p>\n\n\n\nNext, we define our text with the IF formula<\/strong>. The logical test in this formula checks if the value in cell J2<\/strong> (Lebron James in our example) is the same as in the range of our player’s names- range A2:A28<\/strong>.<\/p>\n\n\n\nThis formula goes into every cell in our range and checks if the value is the same or not. If yes, it returns TRUE<\/strong>. If not, it returns FALSE<\/strong>.<\/p>\n\n\n\nThe next part of the formula returns all the points that a certain player (located in cell J2<\/strong> in this case) had in all games. We do that by making sure that the value_if_true<\/strong> part of this formula equals the range where points are found (that is range D2:D28<\/strong>).<\/p>\n\n\n\nSo, if the name in cell J2<\/strong> corresponds to the name in our range, then the points for this player will be presented and will be separated by a comma and space.<\/p>\n\n\n\nThe results are as follows:<\/p>\n\n\n\n <\/figure>\n\n\n\nAll we need to do to apply the same concept for Anthony Davis is to drag the formula to cell K2<\/strong>. Since we have the defined ranges locked, we will get the right numbers:<\/p>\n\n\n\n <\/figure>\n\n\n\nThis formula is different for Excel 2019<\/strong> and Microsoft 365<\/strong> users. If you are using Excel 2019<\/strong>, you need to enter the formula, and then hold CTRL + SHIFT,<\/strong> and then press ENTER<\/strong>. The reason for this is that we are dealing with dynamic arrays in this formula.<\/p>\n\n\n\nMicrosoft 365<\/strong> has them incorporated, so all you need to do is input the formula and then press ENTER<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"We often find ourselves in a situation where we want to have a different view of existing data. As you probably know, Excel…<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[170,190],"yoast_head":"\n
How to Return Multiple Values in One Cell in Excel<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n