I like to use it to help me with the new 365 functions for example:
Q: Give me an example of using the MAP function in excel 365
A: The MAP function can be used to apply a given function to each element of an array or range, and return an array of the results. Here's an example of how you can use the MAP function in Excel 365:
Suppose you have a list of numbers in column A, and you want to calculate their squares using the MAP function. You can follow these steps:
Select an empty cell where you want the results to appear, such as cell B1.
Enter the formula =MAP(A1:A10, x -> x^2) in the cell B1. This formula applies the square function (x -> x^2) to each element of the range A1:A10 using the MAP function, and returns an array of the squared values.
Press Enter to calculate the results.
The resulting array will contain the squares of the numbers in column A. You can then copy the formula down the column to apply it to other ranges or lists of numbers.
--------------
It is also very good at annotating code:
I asked it to annotate the below:
Sub test()
Dim rng As Range, unq As Variant, x As Long, wb As Workbook, ws As Worksheet
Dim hVar As Variant, rCount As Long
Set rng = Sheet1.ListObjects("Table1").DataBodyRange
hVar = Sheet1.Range("A1:F1").Value
unq = Application.Unique(Application.Index(rng, , 2))
For x = 1 To UBound(unq)
Set ws = Sheets.Add(, Sheets(Sheets.Count))
ws.Name = unq(x, 1)
ws.Range("A1:F1") = hVar
rCount = Application.CountIf(Sheet1.Range("B:B"), unq(x, 1))
ws.Range("A2:F" & rCount + 1) = Evaluate("FILTER(Sheet1!A:F,Sheet1!B:B=""" & unq(x, 1) & ""","""")")
ws.Range("A:F").EntireColumn.AutoFit
Next x
Sheets(Application.Transpose(unq)).Move
End Sub
It gave me:
Sub test()
Dim rng As Range, unq As Variant, x As Long, wb As Workbook, ws As Worksheet
Dim hVar As Variant, rCount As Long
'Declare variables
Set rng = Sheet1.ListObjects("Table1").DataBodyRange 'Define the range of data to be analyzed
hVar = Sheet1.Range("A1:F1").Value 'Store the header row of the data in a variable
unq = Application.Unique(Application.Index(rng, , 2)) 'Identify unique values in the second column of the data and store them in a variable
'Loop through the unique values and create a new worksheet for each value
For x = 1 To UBound(unq)
Set ws = Sheets.Add(, Sheets(Sheets.Count)) 'Create a new worksheet
ws.Name = unq(x, 1) 'Name the worksheet with the unique value
ws.Range("A1:F1") = hVar 'Copy the header row to the new worksheet
rCount = Application.CountIf(Sheet1.Range("B:B"), unq(x, 1)) 'Count the number of rows with the unique value
ws.Range("A2:F" & rCount + 1) = Evaluate("FILTER(Sheet1!A:F,Sheet1!B:B=""" & unq(x, 1) & ""","""")") 'Copy the rows with the unique value to the new worksheet
ws.Range("A:F").EntireColumn.AutoFit 'Auto-fit the columns in the new worksheet
Next x
Sheets(Application.Transpose(unq)).Move 'Move the new worksheets to the front of the workbook in the order of the unique values
End Sub
-----------
It works very well as an assistant but it still makes a lot of mistakes and generally can be confused about the new dynamic array formulae in 365, it is better than BARD at this point as BARD does not seem to support code or formulae yet.