Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default EZ?- Trying to insert a simple formula using VB

I need to code some stuff in Excel before I import it into Access... I can
code vb in Access but get mixed up in Excel:

I want to insert a formula in a cell, but it doesn't like the parens around
unit summary:

Range("O1").Formula = "=COUNTA(A13:A100) -COUNTIF(E13:E100,"Unit Summary")"

Seemed like there were other examples on this site of using "" in a formula
or value? I tried no parens (returns 0 for countif) and tried '. Thx
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default EZ?- Trying to insert a simple formula using VB

Range("O1").Formula = "=COUNTA(A13:A100) -COUNTIF(E13:E100,""Unit
Summary"")"

Quote within quotes: two quotes

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Maarkr" wrote in message
...
I need to code some stuff in Excel before I import it into Access... I can
code vb in Access but get mixed up in Excel:

I want to insert a formula in a cell, but it doesn't like the parens
around
unit summary:

Range("O1").Formula = "=COUNTA(A13:A100) -COUNTIF(E13:E100,"Unit
Summary")"

Seemed like there were other examples on this site of using "" in a
formula
or value? I tried no parens (returns 0 for countif) and tried '. Thx


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default EZ?- Trying to insert a simple formula using VB

Try the below (in one line)

Range("O1").Formula = "=COUNTA(A13:A100) -COUNTIF(E13:E100,""Unit Summary"")"

If this post helps click Yes
---------------
Jacob Skaria


"Maarkr" wrote:

I need to code some stuff in Excel before I import it into Access... I can
code vb in Access but get mixed up in Excel:

I want to insert a formula in a cell, but it doesn't like the parens around
unit summary:

Range("O1").Formula = "=COUNTA(A13:A100) -COUNTIF(E13:E100,"Unit Summary")"

Seemed like there were other examples on this site of using "" in a formula
or value? I tried no parens (returns 0 for countif) and tried '. Thx

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default EZ?- Trying to insert a simple formula using VB

so Excel uses dbl quotes instead of single quotes... not like access vb.
Verrrry interesting.

"Maarkr" wrote:

I need to code some stuff in Excel before I import it into Access... I can
code vb in Access but get mixed up in Excel:

I want to insert a formula in a cell, but it doesn't like the parens around
unit summary:

Range("O1").Formula = "=COUNTA(A13:A100) -COUNTIF(E13:E100,"Unit Summary")"

Seemed like there were other examples on this site of using "" in a formula
or value? I tried no parens (returns 0 for countif) and tried '. Thx

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
how do I insert simple checkbox which can be checked by a click? mgreen74 Excel Discussion (Misc queries) 5 August 19th 09 04:31 PM
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 03:36 PM
Request for VB to do something simple (insert text in a column ofcells) David Nebenzahl Excel Discussion (Misc queries) 5 November 21st 07 04:24 AM
Simple problem, simple formula, no FUNCTION ! Ron@Buy Excel Worksheet Functions 6 September 28th 07 04:51 PM
How do i insert a simple checkable box (<2.57 columng width)? LostinKtown Excel Discussion (Misc queries) 5 September 13th 05 01:24 AM


All times are GMT +1. The time now is 06:17 PM.

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

About Us

"It's about Microsoft Excel"