filtering and copying

Kspider

New Member
Joined
Apr 14, 2003
Messages
26
Hope I can explain this right.
Ok , every morning I run a macro that compares the previous two days prices for items. Now under certain circumstances I want to replace the new price over an old price, if in fact it has changed over a certain tolerence. Now I have a diff column, which I use to filter the changes over tolerence, what I have been doing is hand inputting the new over old prices. I tried copying the filtered list, but when I paste it screws up. It starts in the cell I want, but starts pasting in the hidden cells. Is there a way around this?
Hope I made myself clear.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Perhaps something like this will work, which selects visible cells only :-

Code:
Range("A2:C8").Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.PasteSpecial Paste:=xlValues
 
Upvote 0
That works for copying the cells but the pasting over to adjacent cells is where the problems lies.

For example (sorry can't do the excel paste thing):

Price 1 Price 2 Diff
a1=20 b1=20 c1=00
a2=15 b2=25 c2=10
a3=12 b3=32 c3=20
a4=33 b4=33 c4=00
a5=22 b5=75 c5=53

I will filter for differences, and will get rows 2,3,5 visible. I want to able to copy the visible cells of b2,b3,b5 and paste them into a2,a3,a5.
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,816
Members
449,095
Latest member
m_smith_solihull

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