Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula result does not match displayed result | Excel Worksheet Functions | |||
Formula Bar F9 Result differs from cell result??? | Excel Worksheet Functions | |||
Advanced formula - Return result & Show Cell Reference of result | Excel Worksheet Functions | |||
Median result used in formula gives incorrect result | Excel Worksheet Functions | |||
VBA Formula Result Different Than Manual Formula Result | Excel Programming |