![]() |
How to enter a formula ?
When I use:
Range("E1").Formula = "=A1*10" No problem. When I enter in the spread sheet: =LEFT(A1,SEARCH(" - ",A1)-1) No problem. But when I use: Range("E1").Formula = "=LEFT(A1,SEARCH(" - ",A1)-1)" I get "Run-time error 13:. How can I have VBA enter the second formula ? Thank you, Emory |
How to enter a formula ?
Hi
Range("E1").Formula = "=LEFT(A1,SEARCH("" - "",A1)-1)" "" - "" Double them -- Regards Ron de Bruin http://www.rondebruin.nl "Emory Richter" wrote in message m... When I use: Range("E1").Formula = "=A1*10" No problem. When I enter in the spread sheet: =LEFT(A1,SEARCH(" - ",A1)-1) No problem. But when I use: Range("E1").Formula = "=LEFT(A1,SEARCH(" - ",A1)-1)" I get "Run-time error 13:. How can I have VBA enter the second formula ? Thank you, Emory |
How to enter a formula ?
|
How to enter a formula ?
Range("E1").Formula = "=LEFT(A1,SEARCH("" - "",A1)-1)"
When you use double quotes within a text string you have to enter two double quotes to get one. -- Regards, Tom Ogilvy "Emory Richter" wrote in message m... When I use: Range("E1").Formula = "=A1*10" No problem. When I enter in the spread sheet: =LEFT(A1,SEARCH(" - ",A1)-1) No problem. But when I use: Range("E1").Formula = "=LEFT(A1,SEARCH(" - ",A1)-1)" I get "Run-time error 13:. How can I have VBA enter the second formula ? Thank you, Emory |
How to enter a formula ?
|
All times are GMT +1. The time now is 11:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com