need help with pivot table formating
Hi ti all:
I got a pivot table getting data from an odbc SQL server. The first column is agent ID, the second one is supervisor, the third is agent name and the fourth one is the call volume. Here is an example: AgentID Name Supervisor Call volume 01 Nick Super1 10 Nick Super1 4 02 John Super1 5 03 Marie Super2 8 If I do a Vlookup for agentID 01, I'll get call volume of 10 but in fact it's 14 since Nick got 10+4. I can't combine a sum with vlookup with the name since Nick is not the only name showing in the pilot table. I need to find a way of calculating call volume of agentid 01 untill I get a different agentid in a vlookup. Thanks a bunch! |
need help with pivot table formating
On 25 mai, 12:49, magickarle wrote:
Hi ti all: I got a pivot table getting data from an odbc SQL server. The first column is agent ID, the second one is supervisor, the third is agent name and the fourth one is the call volume. Here is an example: AgentID Name Supervisor Call volume 01 Nick Super1 10 Nick Super1 4 02 John Super1 5 03 Marie Super2 8 If I do a Vlookup for agentID 01, I'll get call volume of 10 but in fact it's 14 since Nick got 10+4. I can't combine a sum with vlookup with the name since Nick is not the only name showing in the pilot table. I need to find a way of calculating call volume of agentid 01 untill I get a different agentid in a vlookup. Thanks a bunch! Here the macro I created. it's seems to work. if anynone want to tweek it so it's more efficient, you're welcome Sub copydate() Row = Row + 1 totalrows = ActiveSheet.UsedRange.Rows.Count daterow = daterow + 1 agentrow = agentrow + 1 For Row = Row To totalrows If Cells(Row, 3) = 0 Then daterow = Cells(Row - 1, 3) ' Cells(Row, 2).Value = daterow Cells(Row, 3).Value = daterow End If Next Row End Sub |
All times are GMT +1. The time now is 08:55 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com