How the color palette works (#palette)
We copied this Find function down the column so you can see that it returns a different value each time, depending on where the dash appears in the strings in column A. In order to extract the first two characters that follow the dash, you'll use the Find function to locate the dash and add 1 to that result. The Find function returns the location of the dash; you want to start extracting characters beginning at the next character, the one following the dash.
That formula says, in English, "Look at A2; determine the position of the dash in A2; add 1 to that value; then return the next two characters. The Mid function relies on the Find function to tell it where the dash appears in the source string. You add 1 circled in red to the Find function's result to start the extraction in the correct place.
Only the beginningWe've just scratched the surface of what you can do by combining the Find and Mid functions. In a future article, we'll show you how to use a variation of this technique to transpose first and last names to format them as Last, First. To comment on this article or to share your favorite Excel tip, please post a comment below or drop us a note.
Inside the Raspberry Pi: How self-driving tractors, AI, and precision agriculture will save us from the impending food crisis. How IoT, robotics, and AI are tackling one of the biggest problems of the century. How digital farming is revolutionizing the future of food. We deliver the top business tech news stories about the companies, the people, and the products revolutionizing the planet.
Our editors highlight the TechRepublic articles, galleries, and videos that you absolutely cannot miss to stay current on the latest IT news, innovations, and tips. The Find function returns the position of the dash in each of the strings in column A. My Profile Log Out. Address Cells 1, columnName 1. Siddharth Rout k 14 I played with your code, change rng to rng , change Set rng Eventually saw the tiny difference: Thank you for taking the time to write up this example, it was certainly helpful.
Adios to Winter Bash