Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Correct Format for formula


Can anyone tell me what the correct format would be for this formula. I
know I am close however I keep getting a complile error


Code:
--------------------
.Offset(1, 2).Formula = "=CountIf(C7:C" & (lngLastRow - 1) ,"X")"
--------------------


--
parteegolfer
------------------------------------------------------------------------
parteegolfer's Profile: http://www.excelforum.com/member.php...o&userid=31951
View this thread: http://www.excelforum.com/showthread...hreadid=529020

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Correct Format for formula

..Offset(1, 2).Formula = "=CountIf(C7:C" & (lngLastRow - 1) & ",""X"")"

Watch your commas and double quotes have to be doubled up within the string.

parteegolfer wrote:

Can anyone tell me what the correct format would be for this formula. I
know I am close however I keep getting a complile error

Code:
--------------------
.Offset(1, 2).Formula = "=CountIf(C7:C" & (lngLastRow - 1) ,"X")"
--------------------

--
parteegolfer
------------------------------------------------------------------------
parteegolfer's Profile: http://www.excelforum.com/member.php...o&userid=31951
View this thread: http://www.excelforum.com/showthread...hreadid=529020


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Correct Format for formula


Thanks Dave, However one more issue. How bout this one

..Offset(4, 2).Formula = "=.Offset(1,2)/.Offset(1,0)"


--
parteegolfer
------------------------------------------------------------------------
parteegolfer's Profile: http://www.excelforum.com/member.php...o&userid=31951
View this thread: http://www.excelforum.com/showthread...hreadid=529020

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Correct Format for formula

.Offset(4, 2).Formula = "=" & .Offset(1,2).Value _
& "/" & .Offset(1,0).Value

or

.Offset(4, 2).Formula = "=" & .Offset(1,2).Value _
/ .Offset(1,0).Value

or

.Offset(4,2).Formula = "=" & .Offset(1,2).Address(0,0) _
& "/" & .Offset(1,0).Address(0,0)

or

.Offset(4,2).Formula = "=" & .Offset(1,2).Address _
& "/" & .Offset(1,0).Address


Depends on what you want as the final result.

--
Regards,
Tom Ogilvy



"parteegolfer"
wrote in message
news:parteegolfer.25nuby_1144020601.6365@excelforu m-nospam.com...

Thanks Dave, However one more issue. How bout this one

Offset(4, 2).Formula = "=.Offset(1,2)/.Offset(1,0)"


--
parteegolfer
------------------------------------------------------------------------
parteegolfer's Profile:

http://www.excelforum.com/member.php...o&userid=31951
View this thread: http://www.excelforum.com/showthread...hreadid=529020



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 to correct the number format? Prateep Excel Discussion (Misc queries) 2 January 20th 08 12:33 PM
Correct format for linking a workbook and a formula Mark4253 Excel Discussion (Misc queries) 2 February 7th 07 03:36 AM
How can I correct a custom format? Brent Excel Discussion (Misc queries) 3 September 21st 06 01:45 PM
Correct Format for formula parteegolfer Excel Worksheet Functions 2 April 24th 06 09:05 PM
Date Format Correct, But Formula Error john_mc Excel Discussion (Misc queries) 1 April 10th 06 04:25 AM


All times are GMT +1. The time now is 02:40 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"