ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   copy paste only value with VBA from pivot table (https://www.excelbanter.com/excel-programming/422796-copy-paste-only-value-vba-pivot-table.html)

karlo via OfficeKB.com

copy paste only value with VBA from pivot table
 
I have on sheet1 pivot table where is month in the page fields,emplooyes is
in the row fields and
working hours is in the column fields.
On the another sheet (sheet2) i make simple table where is in column A
emplooyes and in the column
from B to M is months of year.
I would like write a code, if is it possible, who will look "emplooyes on the
sheet2 ,"month" in the pivot table(sheet1) and then copy paste only value
"working hours" from pivot table(sheet1) range B5:B50
to the column B2:B50 if month is January or C2:C50 if month is February and
etc.
I try with following formula:
=if(sheet1!$A$1="jan";vlookup(sheet2!$A2;sheet1!$A $5:$B$50;2;false)) but I
must every time scroll down formula, drag all range to another column and
then make copy paste special copy only value
if I want change month in the pivot table.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200901/1



All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com