Forumla to Copy multiple Cells

GreenyMcDuff

Active Member
Joined
Sep 20, 2010
Messages
313
Hi all,

I have the following data sheet:

HTML:
Price A	Price B	Type 1	Date 1		Price C	Price D	Type 2	Date 2
					A	B	Trade	10/05/2011
					A	B	Trade	10/05/2011
					A	B	Bid	10/05/2011

I need a formula that works in the following way:

IF Type 2 = "Bid" Then
Copy Price C to Price A
Copy Price D to Price B
Copy Date 2 to Date 1

This is a formula that I came up with.... it does not do the trick

Code:
=IF(S1="Bid",(M1=Q1,N1=R1,P1=U1),"")

Thanks for your help

Chris
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Generally speaking a formula can only affect the cell you enter it into. I think you're looking for a macro solution
 
Upvote 0
Chris,

This macro may be what you want:
Code:
Sub KillAllTheHumans ()
 
Dim i as Long
 
Application.ScreenUpdating = False
 
For i = 1 to Range("S" & Rows.Count).End(xlUp).Row
 
  If Range("S" & i) = "Bid" Then
    Range("M" & i) = Range("Q" & i)
    Range("N" & i) = Range("R" & i)
    Range("P" & i) = Range("U" & i)
  End If
 
Next i
 
Application.ScreenUpdating = True
 
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,548
Messages
6,179,443
Members
452,915
Latest member
hannnahheileen

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