Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
sgausti
 
Posts: n/a
Default Copy an "if" Statement

I have a simple formula =IF(C2<C3,1," "). This formula works perfectly when
I type it in. I have a spreadsheet with over 10000 lines and want to copy
this formula down. When I copy the formula and paste it, it no longer gives
me the correct output. What can I do?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ian
 
Posts: n/a
Default Copy an "if" Statement

That depends what you actually want to compare.
If, in the line below the original you want C3<C4 then it should work, but
if eg you always want to compare to C2 (eg C2<C4) then you need to tell
Excel it's an absolute reference ie enter C2 as $C$2 (or if you only want to
lock the row number C$2).

--
Ian
--
"sgausti" wrote in message
...
I have a simple formula =IF(C2<C3,1," "). This formula works perfectly
when
I type it in. I have a spreadsheet with over 10000 lines and want to copy
this formula down. When I copy the formula and paste it, it no longer
gives
me the correct output. What can I do?



  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Copy an "if" Statement

Make sure you have calculation set to automatic:
tools|options|calculation tab

And I'd use this formula instead:

=if(c2<c3,1,"")

cells that contain spaces look empty, but can screw up other formulas if you're
not careful:

=if(d2="","nothing in there","not empty")

sgausti wrote:

I have a simple formula =IF(C2<C3,1," "). This formula works perfectly when
I type it in. I have a spreadsheet with over 10000 lines and want to copy
this formula down. When I copy the formula and paste it, it no longer gives
me the correct output. What can I do?


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
sgausti
 
Posts: n/a
Default Copy an "if" Statement

Thanks Dave... This was my problem. Didn't have automatic selected.

"Dave Peterson" wrote:

Make sure you have calculation set to automatic:
tools|options|calculation tab

And I'd use this formula instead:

=if(c2<c3,1,"")

cells that contain spaces look empty, but can screw up other formulas if you're
not careful:

=if(d2="","nothing in there","not empty")

sgausti wrote:

I have a simple formula =IF(C2<C3,1," "). This formula works perfectly when
I type it in. I have a spreadsheet with over 10000 lines and want to copy
this formula down. When I copy the formula and paste it, it no longer gives
me the correct output. What can I do?


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.misc
Bearacade
 
Posts: n/a
Default Copy an "if" Statement


Where is this formula on? Are they referencing the same relative
positions?

For example, if the Value is in D3, and you drag the formula down to
D4, the new formula will be =IF(C3<C4,1," ")


--
Bearacade


------------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
View this thread: http://www.excelforum.com/showthread...hreadid=556122



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
Return blank for true "if" statement when charting, not 0 Jay F Charts and Charting in Excel 1 June 21st 06 04:15 PM
Using COPY with an IF formula burnsbyrne Excel Discussion (Misc queries) 2 May 19th 06 06:02 PM
How can I copy cell formats in functions? Twitty Kitty Excel Worksheet Functions 3 July 24th 05 12:26 AM
Copy Function Genie Bohn Excel Discussion (Misc queries) 0 March 23rd 05 12:28 AM
Copy and pasting graphs to PowerPoint JZip Excel Discussion (Misc queries) 0 January 6th 05 08:29 PM


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