See what’s possible with Copilot in Excel (part 7) by info.odysseyx@gmail.com September 30, 2024 written by info.odysseyx@gmail.com September 30, 2024 0 comment 0 views 0 Hello everyone, over the past few weeks we have been series of posts Let me show you a few things you can do with Copilot in Excel. This week, we’ll show you how Copilot in Excel can help you create formulas to calculate unique values. In this example we have Given a table of event locations, I would like to figure out a formula to calculate each location. Event location table with date and location columns Let’s find out how many locations are listed based on the returned values. How many different locations are there? Copilot in Excel window with prompt above and response below. The analyzed data for B2:C156 returns: Number of unique locations 50 The co-pilot said: There are 50 different locations. Copilot returns the answer of 50, but I’d like to have a formula that updates when the list changes. My colleague suggested the formula below, but I don’t understand it. I ask my co-pilot: A colleague gave me the following formula to calculate distinct positions: Can you tell me how it works? =SUM(–(FREQUENCY(MATCH(C:C, C:C, 0), MATCH(C:C, C:C) , 0)) > 0)) Copilot in Excel window with prompt above and response below. This formula calculates the number of individual positions in column C. Here’s how it works: MATCH(C:C, C:C, 0): This part of the formula creates an array of positions for each value in column C. 0 indicates an exact match. FREQUENCY(MATCH(C:C, C:C, 0), MATCH(C:C, C:C, 0)): The FREQUENCY function is used to count the number of times each value appears in the array created by MATCH. . function. Returns an array where each element represents the frequency of that value. FREQUENCY(…) > 0: This part of the formula creates a boolean array whose each element is TRUE if its frequency is greater than 0 and FALSE otherwise. –(FREQUENCY(…) > 0): The double unary operator (–) converts a boolean array to an array of 1’s and 0’s. Here TRUE becomes 1 and FALSE becomes 0. SUM(…): Finally, the SUM function adds an array of 1’s and 0’s to give the total number of unique positions. I understand the formula, but it seems too complicated. I’d like to see if Copilot can do better. I ask: Can you simplify the formula? Copilot in Excel window with prompt above and response below. Yes, you can simplify the formula. Here’s a simpler way to count unique locations using the UNIQUE and COUNTA functions: =COUNTA(Unique(Table 19[Location])) It’s much simpler! Copy the formula from the Copilot window and copy it into your workbook. Now, when you make changes to the table, the unique location count is automatically updated. Two cells with the values ’Unique Locations’ and ’50’ returned from the formula entered next to the Event Locations table. If you missed some additional examples from the past six weeks, here are a few more: Stay tuned. Microsoft Excel Team *Disclaimer: If you’ve tried these types of messages and they don’t work as expected, it’s most likely due to our gradual feature rollout process. Please try again in a few weeks. Source link Share 0 FacebookTwitterPinterestEmail info.odysseyx@gmail.com previous post Customer Engagement Executive Opportunity at Matkatus Lifestyle Pvt Ltd in Valasaravakkam, Chennai next post Security settings management is available for multi-tenant environments in Microsoft Defender XDR You may also like From Zero to Hero: Building Your First Voice Bot with GPT-4o Real-Time API using... October 12, 2024 A Guide to Responsible Synthetic Data Creation October 12, 2024 Capacity Template – MGDC for SharePoint October 11, 2024 Using Azure NetApp Files (ANF) for data- and logfiles for Microsoft SQL Server in... October 11, 2024 Microsoft Community – Do you love stickers?! Do you want to be a part... October 11, 2024 Advanced Alerting Strategies for Azure Monitoring October 11, 2024 Leave a Comment Cancel Reply Save my name, email, and website in this browser for the next time I comment.