ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   LookUp on a Pivot table (https://www.excelbanter.com/excel-worksheet-functions/183085-lookup-pivot-table.html)

Carl

LookUp on a Pivot table
 
My pivot table looks like this:

Count of MessageType
Time Total
93001 3
93002 1
93003 1
93004 1
93006 1
93008 1
93009 1
93011 1


I am trying find a formula that creates this table:

93001 3
93002 1
93003 1
93004 1
93005 0
93006 1
93007 0
93008 1
93009 9
93010 0
93011 1


Thank you in advance



ryguy7272

LookUp on a Pivot table
 
Try this:
Sub InsertMissingNum()

Range("A2").Select
Do Until ActiveCell.Value = Empty
If ActiveCell.Value = ActiveCell.Offset(-1, 0).Value + 1 Then
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.EntireRow.Insert
ActiveCell.Value = ActiveCell.Offset(-1, 0).Value + 1
ActiveCell.Offset(1, 0).Select
End If
Loop

End Sub

Regards,
Ryan---

--
RyGuy


"carl" wrote:

My pivot table looks like this:

Count of MessageType
Time Total
93001 3
93002 1
93003 1
93004 1
93006 1
93008 1
93009 1
93011 1


I am trying find a formula that creates this table:

93001 3
93002 1
93003 1
93004 1
93005 0
93006 1
93007 0
93008 1
93009 9
93010 0
93011 1


Thank you in advance




All times are GMT +1. The time now is 08:49 AM.

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