Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Formula Result Different Than Manual Formula Result


I don't really understand your post, Don. Is what you're saying that
should write my code as follows (without the = sign inside the quote
for my string assignment)?
Code
-------------------
Dim ReportD As String
ReportD = "=IF(ISNA(MATCH(R[0]C[-2],PID!B:B,0))=FALSE, ""x"","""")"
Worksheets("Report").Range("D5").Offset(counter, 0).Formula = Report
-------------------
This just seems to put the string in the cells as text and no
formulas.

Thanks,

To

--
ob3ron0
-----------------------------------------------------------------------
ob3ron02's Profile: http://www.excelforum.com/member.php...fo&userid=1545
View this thread: http://www.excelforum.com/showthread.php?threadid=27047

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default VBA Formula Result Different Than Manual Formula Result

for the code shown:

Dim ReportD As String
ReportD = "=IF(ISNA(MATCH(R[0]C[-2],PID!B:B,0))=FALSE, ""x"","""")"
Worksheets("Report").Range("D5").Offset(counter, 0).Formula = ReportD

You have mixed R1C1 addressing and A1 addressing. Do one or the other. Don
appeared to see your requirement as being to calculate the result in VBA and
return it to the variable. It appears here that you want to put a formula
in a cell, so you need to retain the equal sign.

--
Regards,
Tom Ogilvy


"ob3ron02" wrote in message
...

I don't really understand your post, Don. Is what you're saying that I
should write my code as follows (without the = sign inside the quotes
for my string assignment)?
Code:
--------------------
Dim ReportD As String
ReportD = "=IF(ISNA(MATCH(R[0]C[-2],PID!B:B,0))=FALSE, ""x"","""")"
Worksheets("Report").Range("D5").Offset(counter, 0).Formula = ReportD
--------------------
This just seems to put the string in the cells as text and not
formulas.

Thanks,

Tom


--
ob3ron02
------------------------------------------------------------------------
ob3ron02's Profile:

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



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
Formula result does not match displayed result lothar Excel Worksheet Functions 1 June 23rd 08 05:05 AM
Formula Bar F9 Result differs from cell result??? Aaron Excel Worksheet Functions 3 May 15th 08 06:32 PM
Advanced formula - Return result & Show Cell Reference of result Irv Excel Worksheet Functions 7 May 6th 06 03:36 AM
Median result used in formula gives incorrect result vlatham Excel Worksheet Functions 4 September 21st 05 04:26 PM
VBA Formula Result Different Than Manual Formula Result ob3ron02 Excel Programming 1 October 19th 04 03:45 PM


All times are GMT +1. The time now is 02:11 AM.

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"