下端 = Sheets(ピボット).Range("B" & Rows.Count).End(xlUp).Row '下端検出 右端 = Sheets(ピボット).Cells(2, Columns.Count).End(xlToLeft).Column '右端検出