Home |
Search |
Today's Posts |
#12
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Ron
Uhmm..fine! I don't have any single word to ask you for this function further. Maybe, i, by myself, could'nt find the usage of this function by any strech of my imagination. Any way I thank you very much. Have a happy new year. Regards keizi "Ron Rosenfeld" wrote in message ... OK, I think I understand what you are doing. The function can return either a horizontal or vertical array. But to do so, you need to specify the multiple arguments in the form of an array constant within the function. This behavior is similar to standard Excel functions. For example, to return a vertical array of the 1st and 2nd instances, you could enter: =REGEX.MID(A1,"(?<=\s|^)[\w\s]*Taluk",{1;2}) as an array formula in adjacent rows. In other words, you could select B1 & B2; enter the formula in B1 and then hold down <ctrl<shift while hitting <enter. Excel should copy the formula into B2, and surround both with braces {...}. If you have some unknown number of matches, you could replace the array constant in the above {1;2} with the function: ROW(INDIRECT("1:n")) where n is the maximum number of matches that might be, and then enter the formula in multiple cells as I described above. Furthermore, if you require a horizontal array, change the array constant to {1,2}. Please note that I am using the default US separators in my equations. If your Excel version has different separators, you may also need different separators than I used in the array constant. Also, you could obtain these results without using an array formula. For example, in B1 you could enter the formula: =REGEX.MID($A$1,"(?<=\s|^)[\w\s]*Taluk",ROW()) and copy/drag down. The ROW() would give you the sequential numbers for the different matches. To return in a horizontal fashion, you could, in B1, use the formula: =REGEX.MID($A$1,"(?<=\s|^)[\w\s]*Taluk",COLUMN()-1) and copy/drag across. --ron |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to copy the first word or two words from a cell containing a complete sentence to another cell | Excel Discussion (Misc queries) | |||
Copy from Word to Excel, and retain indent, plus word wrap | Excel Discussion (Misc queries) | |||
need formula to search column for a word and return another word | Excel Discussion (Misc queries) | |||
Search for specific words | Excel Worksheet Functions | |||
Macro to search a column for a specific word and replace with | Excel Programming |