Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Compare two cells, if equal move a third cell to another cell

Need a formula to compare the content of two cells and if equal, move (copy)
the content of a third cell to another cell. Any help would be appeciated.

Mike
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Compare two cells, if equal move a third cell to another cell

Hi,

Excel formula can't 'push' data to another cell they can only 'Pull' data
from cells so may be this

=IF(A1=B1,C1,"")

Mike

"Mike" wrote:

Need a formula to compare the content of two cells and if equal, move (copy)
the content of a third cell to another cell. Any help would be appeciated.

Mike

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Compare two cells, if equal move a third cell to another cell

Say we want to test if A1 equals A2, then copy A3 to A4

Try this short macro:

Sub surphace()
Set r1 = Range("A1")
Set r2 = Range("A2")
Set r3 = Range("A3")
Set r4 = Range("A4")
If r1.Value = r2.Value Then
r3.Copy r4
End If
End Sub
--
Gary''s Student - gsnu200822


"Mike" wrote:

Need a formula to compare the content of two cells and if equal, move (copy)
the content of a third cell to another cell. Any help would be appeciated.

Mike

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Compare two cells, if equal move a third cell to another cell

Formulas cannot move or copy.

You would need a fourth cell with a formula like =IF(A1=B1,C1,"not equal")

Note: minimal error-trapping in the formula posted.

To actually copy or move you would need VBA


Gord Dibben MS Excel MVP

On Tue, 30 Dec 2008 11:09:01 -0800, Mike
wrote:

Need a formula to compare the content of two cells and if equal, move (copy)
the content of a third cell to another cell. Any help would be appeciated.

Mike


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
compare cells and sum if equal KBARNET07 Excel Worksheet Functions 2 September 13th 08 03:45 PM
Cells equal to another cell a certain # over Fin Analyst Excel Discussion (Misc queries) 6 April 11th 06 11:46 PM
How do I compare cells and if FALSE compare to next cell in EXCEL Cindie Excel Worksheet Functions 0 March 24th 06 05:29 PM
Formula to move cursor when 2 cells equal mikeburg Excel Discussion (Misc queries) 2 July 8th 05 12:22 AM
How do I make a cell equal to another cells value and not it's fo. TroutKing Excel Worksheet Functions 2 January 17th 05 06:15 PM


All times are GMT +1. The time now is 09:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"