If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#21
|
|||
|
|||
How can I extract the second half of addition ?
On Sun, 28 Sep 2008 20:41:16 +0200, "Gilbert DE CEULAER"
wrote: Thanks, Ron, I do not understand the code... but it works. Gilbert I'm glad it works. Thanks for the feedback. The part of the code that you won't find in the HELP section has to do with the regular expression engine. There is information he http://support.microsoft.com/default...02&Product=vbb http://msdn2.microsoft.com/en-us/library/6wzad2b2.aspx http://www.regular-expressions.info/reference.html The re.Pattern that I am using, "\d(\+\d+$)" matches any digit followed by a '+' followed by any number of digits followed by the end of line. So it is looking for a pattern which matches anything like: 6+2 or 6+234 etc. If that pattern matches, then it returns everything except the leading digit. --ron |
#22
|
|||
|
|||
How can I extract the second half of addition ?
Hello,
Ron's VBA solution might seem preferrable but there is a non-VBA solution: Define the name SecSumPar, for example, which refers to: =MID(GET.CELL(6,INDIRECT("RC[-1]",FALSE)),1+LOOKUP(2,1/ ("+"=MID(GET.CELL(6,INDIRECT("RC[-1]",FALSE)),ROW(INDIRECT("1:"&LEN(GET.CELL(6,INDIREC T("RC[-1]",FALSE))))), 1)),ROW(INDIRECT("1:"&LEN(GET.CELL(6,INDIRECT("RC[-1]",FALSE)))))), 999) Then insert into the next cell right to your cell with =3+4: =SecSumPar and you will get 4 Regards, Bernd |
Thread Tools | |
Display Modes | |
|
|