Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default IF statement failing

I am attempting to get a macro to copy an IF() function using a
relative cell address

Range("K65536").End(xlUp)(1, 2).Select
ActiveCell.FormulaR1C1 = "=IF(RC[-1]<1000,""F"",""H"")"
Selection.Copy
Range(Selection, "L15").Select
ActiveSheet.Paste

I am expecting to see either F or H in the cells but I am seeing the
formula =IF(RC[-1]<1000,"F","H")
I suspect that the problem is something to do with the relative cell
reference as the function wizard in Excel claims this is "Invalid".
Two hours searching the archives has not proved fruitful.

I am frustratingly new to all this so any assistance would be much
appreciated.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default IF statement failing

Check first that the cell is not formatted as Text.
Otherwise check to see if:
Tools|Options.. View tab, that the Formulas checkbox is not checked.
--
p45cal


"kimg" wrote:

I am attempting to get a macro to copy an IF() function using a
relative cell address

Range("K65536").End(xlUp)(1, 2).Select
ActiveCell.FormulaR1C1 = "=IF(RC[-1]<1000,""F"",""H"")"
Selection.Copy
Range(Selection, "L15").Select
ActiveSheet.Paste

I am expecting to see either F or H in the cells but I am seeing the
formula =IF(RC[-1]<1000,"F","H")
I suspect that the problem is something to do with the relative cell
reference as the function wizard in Excel claims this is "Invalid".
Two hours searching the archives has not proved fruitful.

I am frustratingly new to all this so any assistance would be much
appreciated.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default IF statement failing

On Jul 6, 12:08 am, p45cal wrote:
Check first that the cell is not formatted as Text.
Otherwise check to see if:
Tools|Options.. View tab, that the Formulas checkbox is not checked.
--
p45cal



"kimg" wrote:
I am attempting to get a macro to copy an IF() function using a
relative cell address


Range("K65536").End(xlUp)(1, 2).Select
ActiveCell.FormulaR1C1 = "=IF(RC[-1]<1000,""F"",""H"")"
Selection.Copy
Range(Selection, "L15").Select
ActiveSheet.Paste


I am expecting to see either F or H in the cells but I am seeing the
formula =IF(RC[-1]<1000,"F","H")
I suspect that the problem is something to do with the relative cell
reference as the function wizard in Excel claims this is "Invalid".
Two hours searching the archives has not proved fruitful.


I am frustratingly new to all this so any assistance would be much
appreciated.- Hide quoted text -


- Show quoted text -


Thankyou for your reply. I had forced the formatting to text. Once
reformatted to General it worked! Boy, I have a lot to learn.

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
Failing with formula Charlie Excel Discussion (Misc queries) 8 August 5th 09 02:54 PM
Failing IF Statement Jemsilve Excel Discussion (Misc queries) 2 November 9th 07 09:23 PM
My formulas are failing! Excel_Orator Excel Discussion (Misc queries) 3 June 12th 06 08:16 PM
FollowHyperlink failing Andrew Fiddian-Green Excel Programming 0 January 9th 06 11:59 AM
Macro failing Syd[_3_] Excel Programming 0 September 17th 03 02:51 PM


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