cancel
Showing results for 
Search instead for 
Did you mean: 

Paste formula in Excel

remko.bouwens
Level 5
Hey, I'm trying to split tekxt in a cell (word1 - word2) in excel. I found two formulas to do that, but I can't paste it in Excel (also can't set the value). Does anyone know a way to do this? Thnx.
2 REPLIES 2

TomBlackburn1
Level 7
It might be easier if you read the cell value, do the splitting in Blue Prism, then write the values back to the worksheet.

RadoslavHiko
Level 4
You can use the approach suggested by Tom, but if there are many lines, my experience is it takes BP much longer to do this sort of processing than simply copy-pasting a formula into Excel (and letting Excel do the job). You can use the Set Value in MS Excel VBO. For example MS Excel formula could be =IFERROR(TRIM(LEFT(B2;FIND(""-"",B2)-1));B2) - this should give the ""word1"". When passing it to Excel, you would pass ""=IFERROR(TRIM(LEFT(B2,FIND(""""-"""",B2)-1)),B2)"" - note the duplicated quotes to escape those quotes and the commas instead of semi-colons. You must use comma in functions (when using Set Value) even if your environment uses semi-colon.