Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Can I use copy function in an if statement?

I want to say in a formula...

If certain cell contains "DMA", then copy over a formula from a cell
immediately to the left, otherwise "".

Is this possible???
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Can I use copy function in an if statement?

Nope.

But formulas could retrieve the value from that other cell:

In z99 (say)
=if(a1="DMA",y99,"No match")


Neese wrote:

I want to say in a formula...

If certain cell contains "DMA", then copy over a formula from a cell
immediately to the left, otherwise "".

Is this possible???


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,081
Default Can I use copy function in an if statement?

No - you can't 'copy' in a formula, only 'calculate', though calculations can
do lots of things.



"Neese" wrote:

I want to say in a formula...

If certain cell contains "DMA", then copy over a formula from a cell
immediately to the left, otherwise "".

Is this possible???

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 622
Default Can I use copy function in an if statement?

On Sep 5, 7:00 am, Neese wrote:
I want to say in a formula...

If certain cell contains "DMA", then copy over a formula from a cell
immediately to the left, otherwise "".

Is this possible???


The others answered this, but I thought I'd add some details, they
were a bit abrupt....

You need to change your understanding of how formulas work and the
terminology. A formula doesn't "copy" or "enter" a value into a cell.
YOU can do that, but a formula can't. A formula will "calculate" and
"return" the proper value. But you need to tell it how.

So, for your question:
The way to do this is to put the formula you want right into your IF
statement, not in a different cell. (unless you really need that
formula in two cells right next to each other, which seems unlikely)
So if your formula is a simple sum:
=IF(A1="DMA",SUM(A2:A10),"")

And try not to double post. If you have to add to your question, use
the same thread.
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
copy formula as is to new cell in an if statement Neese Excel Worksheet Functions 1 September 5th 08 05:12 AM
Function IF statement Raymond Excel Worksheet Functions 11 February 2nd 08 04:43 AM
copy an entire row IF a statement is true colettey29 Excel Worksheet Functions 1 June 15th 07 06:43 PM
If statement...copy values of cells on another worksheet. heater Excel Discussion (Misc queries) 2 August 31st 05 11:05 PM
HELP!! Need help with if/and/then/copy statement!!! Mel Excel Worksheet Functions 0 March 29th 05 05:59 PM


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