Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default help with syntax

hi

This code gives an error (Application-defined or Object-defined error).

Worksheets("PrintRpts").Range("O8").Formula = "=IF(E8<"",E8,-1)"

But, when I type =IF(E8<"",E8,-1) directly into O8, I get the
expected result. Any ideas where the problem is?

Thanks a bunch
anny


  #2   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default help with syntax

You need another pair of quotes.

Worksheets("PrintRpts").Range("O8").Formula = "=IF(E8<"""",E8,-1)"


"anny" wrote:

hi

This code gives an error (Application-defined or Object-defined error).

Worksheets("PrintRpts").Range("O8").Formula = "=IF(E8<"",E8,-1)"

But, when I type =IF(E8<"",E8,-1) directly into O8, I get the
expected result. Any ideas where the problem is?

Thanks a bunch
anny



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default help with syntax

Works beautyfully!
anny


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
right syntax pls123 Excel Worksheet Functions 8 May 6th 10 05:18 AM
VBA syntax Sunantoro Excel Discussion (Misc queries) 1 September 21st 05 03:19 AM
Syntax help please GettingThere Excel Programming 3 August 19th 05 01:25 AM
Syntax Help Dmorri254 Excel Worksheet Functions 2 March 2nd 05 02:51 PM
syntax for a sub ( ) ibrahim Excel Programming 0 July 22nd 03 03:11 PM


All times are GMT +1. The time now is 02:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"