I need an excel formula that will extract the last four digits of a cell A2 and combine…
- User
I need an excel formula that will extract the last four digits of a cell A2 and combine them with the first two words of the cell in B2, but the data from the two cells should be put together with a hyphen. The space between the words in the second cell should be maintained.
Assistant
You can use the RIGHT function to extract the last four digits of a cell and the CONCATENATE function to combine the results with the first two words of the cell. Here's the formula you can use:
=RIGHT(A2,4) & "-" & CONCATENATE(B2," ",LEFT(B2,2))
This formula will extract the last four digits of cell A2 using the RIGHT function and combine them with the first two words of cell B2 using the CONCATENATE function. The results will be put together with a hyphen and the space between the words in the second cell will be maintained.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.