Re: how to use a macro to move two cells up deleting the two above cell
I do not understand why you seem to be saying clear the cell and then shift ever thing in that column up.
What is the reason why your opposed to deleting the cell which shifts every thing up?
Re: how to use a macro to move two cells up deleting the two above cell
i am combining 2 different price lists. there are over 60k parts.
there are 10 columns of information and both lack info the other has. so together the are complete
the bottom part has the correct price 37.00 and 25.00. those prices 37.00 and 25.00 need to be copies to the others
part# p1 p2
CH1250128 8.75 23.00
CH1250128 8.75 23.00
CH1250128 8.75 23.00
CH1250128 37.00 25.00
to
CH1250128 37.00 25.00
CH1250128 37.00 25.00
CH1250128 37.00 25.00
CH1250128 37.00 25.00
Re: how to use a macro to move two cells up deleting the two above cell
If you have 60,000 rows of data to check you surely cannot do this one at a time.
So in column "B" you have part numbers.
In column H you have "P1" which I guess that means Price 1
In column I you have "P2" which I assume that means Price 2
So are you saying you want to go down all 60,000 rows and change the value in column (H) to the value in Column (I)
See when you use terms like "P1" we have no way of knowing what that means.
Re: how to use a macro to move two cells up deleting the two above cell
If I understand you correctly, try this
Code:
Sub CopyMe()
Dim cnt As Long
For cnt = 2 To Range("B" & Rows.Count).End(xlUp).Row Step 4
Range("H" & cnt).Resize(3, 2).Value = Range("H" & cnt + 3).Resize(, 2).Value
Next cnt
End Sub
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.