Error: Displaying Formulas instead of values

ramanujam

Board Regular
Joined
Dec 16, 2008
Messages
138
Hi all,

While executing the macro in some columns am getting formulas instead of getting values of that formulas...

Like for example am getting like
=RIGHT(RC[-1],2)&"/"&MID(RC[-1],5,2)&"/"&LEFT(RC[-1],4) instead of the values...

Can anyone help me to solve this issue..
Thanks in advance....
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Hi.. thnaks for ur reply..

See how am using is that , to find the both column values are equal or not.

The macro i recorded is
Sub Match()
Range("C1").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-2]=RC[-1],""True"",""False"")"
Range("C1").Select
Selection.AutoFill Destination:=Range("C1:C500")
Range("C1:C500").Select
Range("C1").Select
End Sub

In this am getting only the formulas are displayed instead of values like True or False...

It happens only at some times..
Can u help me to solve this issue...


Any chance of posting the code you're using?
 
Upvote 0
Why not just

Code:
Sub Match()

Range("C1:C500").FormulaR1C1 = "=RC[-2]=RC[-1]"

End Sub
 
Upvote 0
Might be a Text formatting issue, but you can avoid that with a slight tweak to Yard's code:
Code:
Sub Match()
with Range("C1:C500")
   .NumberFormat = "General"
   .FormulaR1C1 = "=RC[-2]=RC[-1]"
End with

End Sub
 
Upvote 0
Thanks all...
Thanks for ur replies..
Its working fine...:):)


Might be a Text formatting issue, but you can avoid that with a slight tweak to Yard's code:
Code:
Sub Match()
with Range("C1:C500")
   .NumberFormat = "General"
   .FormulaR1C1 = "=RC[-2]=RC[-1]"
End with
 
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,381
Messages
6,119,192
Members
448,874
Latest member
Lancelots

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top