Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA to copy values IF
How can I create a statement that will select all rows on sheet 1 that have
Value "X" (text) in Column B and then paste into Sheet 2, A2? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA to copy values IF
Try this
http://www.rondebruin.nl/copy5.htm Below the first macro you can read how to do it manual -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Memphus01" wrote in message ... How can I create a statement that will select all rows on sheet 1 that have Value "X" (text) in Column B and then paste into Sheet 2, A2? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA to copy values IF
Ron - thanks for your help --
it runs perfectly---but when I tried to step out on my own a bit and create up to 8 criteria I am messing up somewhere--- in the line-- rng.AutoFilter Field:=1, Criteria1:="=Netherlands", Operator:=xlOr, Criteria2:="=USA" how would I add a third crtieria, etc? I tried the following: rng.AutoFilter Field:=1, Criteria1:="=Netherlands", Operator:=xlOr, Criteria2:="=USA", Operator:=xlOr, Criteria3:="=FRANCE" , Operator:=xlOr, Criteria4:="=Germany" but keep getting an error on the third Criteria--- Thanks "Ron de Bruin" wrote: Try this http://www.rondebruin.nl/copy5.htm Below the first macro you can read how to do it manual -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Memphus01" wrote in message ... How can I create a statement that will select all rows on sheet 1 that have Value "X" (text) in Column B and then paste into Sheet 2, A2? |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA to copy values IF
There is a Max of 2 when you use AutoFilter
You can use Advanced filter or use a helper column with =OR(A2={"USA","USA2","USA3","USA4","USA5"}) Then use AutoFilter on that column -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Memphus01" wrote in message ... Ron - thanks for your help -- it runs perfectly---but when I tried to step out on my own a bit and create up to 8 criteria I am messing up somewhere--- in the line-- rng.AutoFilter Field:=1, Criteria1:="=Netherlands", Operator:=xlOr, Criteria2:="=USA" how would I add a third crtieria, etc? I tried the following: rng.AutoFilter Field:=1, Criteria1:="=Netherlands", Operator:=xlOr, Criteria2:="=USA", Operator:=xlOr, Criteria3:="=FRANCE" , Operator:=xlOr, Criteria4:="=Germany" but keep getting an error on the third Criteria--- Thanks "Ron de Bruin" wrote: Try this http://www.rondebruin.nl/copy5.htm Below the first macro you can read how to do it manual -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Memphus01" wrote in message ... How can I create a statement that will select all rows on sheet 1 that have Value "X" (text) in Column B and then paste into Sheet 2, A2? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy Values with VBA | Excel Discussion (Misc queries) | |||
copy between worksheets does not copy formulae just values | Excel Discussion (Misc queries) | |||
Copy/Paste how to avoid the copy of formula cells w/o calc values | Excel Discussion (Misc queries) | |||
copy values generated by conditional formula in one sheet to the other work sheet as values | Excel Worksheet Functions | |||
copy values generated by conditional formula in one sheet to the other work sheet as values | Excel Discussion (Misc queries) |