Formula To Count Unique Values Within A Group For Pivot - Paste Special
Jun 26, 2013
I use the following formula to count unique values within a group for a pivot:
=IF(SUMPRODUCT(($CO$2:$CO55681=CO55681)*($E$2:$E55681=E55681))>1,0,1)
When I paste values over the formula it takes around 1 hours to do the 70k cells which is excessive. I want to know if there is a way to speed it up?
I tried doing an =cell and then paste special that and it works really fast but when I delete the actual formula's again the whole sheet locks up.
View 9 Replies
ADVERTISEMENT
Mar 3, 2004
I have a spreadsheet with several records for each person's name.
I want to have pivot tables based on various columns, with the data field being a count of unique occurrences of a person's name.
When I set up a basic Pivot, it counts each occurence of the person's name.
View 9 Replies
View Related
Feb 28, 2008
I have a worksheet with a list of employees and the workgroup they belong to, along with other data like manager, start dates, etc. Recently a couple of the workgroups were duplicated (change in managers), so these employees are showing up on two rows even though the workgroup has the same name. The only differences in the two rows are the workgroup effective start and end dates. I need to be able to count, in a pivot table, the number of unique employee/workgroup combinations there are per workgroup. I can add columns to the sheet, but it's a dynamic set of data that will grow each time it's refreshed...
View 9 Replies
View Related
Jun 19, 2008
I'm trying to create a pivot table that will count how many employees have completed a Learning Plan. This task becomes complex (for me) because each learning plan has multiple Courses, each Course has a status of "Completed" or "Incomplete". A Learning Plan would only be considered "Completed" if all the courses within that Learning Plan were completed. In doing some research, it looks like I'll need to create another column of data, that shows per employee, per Learning Plan, if the entire Learning Plan has been completed, but I'm not sure of the best way to go about this. Please find SampleData attached.
View 5 Replies
View Related
May 16, 2013
I have data that has a customer name and the month that they were taken care of" (of course not spaces
Customer Month
Smith January
Smith January
Mark January
Suzy January
Smith February
Mark February
I want a pivot table to say:
Month #customers
January 3
February 2
but when I do the count it adds the total number of customer names and gives (it is counting smith twice in January
Month #customers
January 4
February 2
I was reading something about doing the count (so it shows 4) and then doing an index within the count but I keep just getting 1 as the value (for both months).
I tried doing a formula in the document that said =IF(ISERROR(MATCH(A2,$A$1:A15,0)),1,0). basically looking to see if the name is above the location I am looking at and if it is to put a 0 if not put 1 and then do a sum of that column....trouble is that when a customer has orders on more than one month, the second month is coming up with a 0 instead of a 1 (and this happens quite often).
I am not sure what to do. if the customer shows up in more than one month I want them to count towards the unique count of both january and february...we look at each month separately.
View 3 Replies
View Related
Jun 20, 2014
I have data set up like the example but then for 1797 lines.
D39BKYes
D39BKYes
D39BKYes
D39BKYes
GHFLBNo
R80FANo
R80FANo
[code].....
What I need to get in a pivot table is: two columns or rows (Yes / No) and the unique count of the code.In this case is should show Yes: 2 and No: 3
View 2 Replies
View Related
Jun 21, 2013
How do count unique values in category in pivot table. (my table, im taking data from ms query). I am using excel 2010
Pivot table example: the result i want is the "no of types" as my data only show "category" and "types".
Category
Types
No of Types
Fruits
Apple
Pear
Orange
3
Vegetable
Cabbage
1
View 4 Replies
View Related
Jun 28, 2009
I have a little bit of problem with lookup function. When i paste values from another worksheet (paste special, values) in a cell which is lookup value i get #N/A. These values are numbers. When i put '7 for example i get the values i want from lookup table. I have a lot of these cells and its tedious job to put ' in front of every value. Is there a quicker solution?
View 3 Replies
View Related
Mar 18, 2014
I need to count the unique items in a range that don't contain the string "option". I would like not to use VBA for that but I can't make it work with a simple formula.
For now, I have :
[Code] ......
That doesn't count the cell with the content "option" and count correctly the other unique items. However I need to ignore any cell that contains the string "option" (with wildcards).
View 8 Replies
View Related
Jul 6, 2008
my destination cells will have formulas like:
='E:My WorkTestData[CCC.xlsx]Input'!$S$31
Everything works fine. But I don't want the destination cells to display the full formula, but the actual Value only
I thought of a way to build a script that first builds the formula to one cell then Copy Paste Special value of that Cell to my desired Cell.
But when the code runs The cursor moves back and forth all the time...
View 9 Replies
View Related
Apr 16, 2014
Using Excel 2013.
Is it possible to get a unique count in a group subtotal though the elements in the group may not be unique using Pivot Tables w/o resorting to Power Pivot?
Ex
Group 123
Group 456
Are both members of NorthDivision
If someone is in Group 123 for 9 months, then Group 456 for 3 months, that membership should be reflected in the correct group accordingly.However, that person should only be counted once in the NorthDivision, not twice.
Output:
Group 123 0.75
Group 456 0.25
NorthDivision 1
At first glance, it appears easy, however, what if membership is only total 3 months?Then Group would increment 0.25, but I need NorthDivision to increment 1
View 5 Replies
View Related
Jun 4, 2013
I have a worksheet. I would like to count unique number of "Trans" in column A only if value of cells in column B "Type" equals "Return". In example below, I would want to see the value "3" as total.
Trans Type
1 Return
2 Return
2 Return
3 Exch
4 Exch
5 Return
5 Return
View 9 Replies
View Related
Mar 17, 2007
Paste can this be set to default to Paste Special Values only ?
I have a sheet with a number of lists validated drop down boxes. The sheet is networked and works fine.
Problem other users as they are entering information into the required cells they are copying and pasting. Then the inevitable occurs they paste data into the wrong cells the validation from the original cell is pasted as well. Is there a way I can set paste special values only to be the default for the full sheet.
Unfortunately we use excel 97 in the office.
View 9 Replies
View Related
Nov 4, 2009
Working in one workbook, I am using sheet 1 as a master form and copying it to the back of the workbook and renaming it.
View 3 Replies
View Related
Nov 6, 2007
I have a person who needs to be able to copy and paste values very frequently. She would like me to set up a personal macro on her PC that will allow her to be able to right-click in a cell and have a context item that is paste values so she does not need to go to the paste special dialog continually.
E.g: She selects a range from one workbook and copies it, She then selects a cell in a second workbook and pastes the values into the second workbook. She does not mind pasting the formatting, but she does not want to paste the formulas as there are many named ranges in the formulas and if she inadvertently pastes everything, all of a sudden the next time she opens her second workbook there are links to the first. All she wants in the second workbook are the values, not the formulas.
View 9 Replies
View Related
Dec 21, 2008
I want to put a button on a sheet that will paste special (VALUES) from the clipboard into whichever cell is selected.
What code do I use? I'm using Excel 2007
View 13 Replies
View Related
Mar 14, 2011
I am trying to copy a range of cells and Need to transpose the values. Easy Enough? When I right-click and paste special, it gives me a new window with an array of options but not the standard Paste special value screen. I have used the others in the past and just pasted text. However this does not give me the paste transpose option which is what I need.
I am sure this is a User error where there is something about the way that I am copying this information but I am Drawing a Blank...
View 7 Replies
View Related
Oct 26, 2006
I have a workbook where I want to retain FORMATS in all of my cells in all of my sheets, but allow the user to enter data. So I got this code to undo PASTE and instead do a PASTE SPECIAL VALUES:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim UndoString As String
On Error GoTo err_handler
UndoString = Application.CommandBars("Standard").Controls("&Undo").List(1)
If Left(UndoString, 5) = "Paste" Then 'Only allow Paste Special|Values
Application.ScreenUpdating = False
Application.Undo
Target.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.ScreenUpdating = True
End If......................
View 9 Replies
View Related
May 14, 2007
I have a macro that should allow users to change a certain range to values, but I have problems with that last piece. Can anyone tell me what the command is to paste the range as values?
Sub Change_Range()
Dim UserRange As Range
DefaultRange = Selection.Address
On Error Goto Canceled
Set UserRange = Application.InputBox _
(Prompt:="Change Range to Values:", _
Title:="Range Change", _
Default:=DefaultRange, _
Type:=8)
UserRange.Copy
UserRange.PasteSpecial
Canceled:
End Sub
View 9 Replies
View Related
Oct 31, 2011
I have a workbook which contains lots of formula and is therefore very large (about 70 mb). The sheet pulls information from field instruments every hour of every day for the entire year.
I want to write a macro, that loops through a range (B5:B8764) and copies the entire row if the value in column B is less than =NOW() - 7 days. The copied rows should then be pasted with values only exactly where they were located e.g. row 5 should be pasted back to row 5 the only difference being only the values will be pasted.
View 2 Replies
View Related
Jan 4, 2012
I have a perplexing problem. I created code to copy a worksheet that has the correct page setup and then copy/paste special to get just the values, not the formulas from the master sheet. It works standalone - the copied worksheet after doing the paste/special just has the data along with the master sheet's original page setup. When I include the code within a For Each... loop, it only copies the worksheet and I get the formulas. What is different between the two approaches that would cause the loop code to not do the paste/special values?
Code that works:
Application.DisplayAlerts = False
Application.CutCopyMode = False
Sheets("PerfCompDashDistrict").Activate
Sheets("PerfCompDashDistrict").Select
Sheets("PerfCompDashDistrict").Copy Before:=Sheets("Store")
[Code] ........
Code doesn't work:
For Each DistrictCell In DistrictRange
Sheets("PerfCompDashDistrict").Range("c4") = DistrictCell
Calculate
Sheets("PerfCompDashDistrict").Activate
Sheets("PerfCompDashDistrict").Select
Sheets("PerfCompDashDistrict").Copy Before:=Sheets("Store")
[Code] .....
View 2 Replies
View Related
May 16, 2012
create a macro to perform paste special as value function. First scenario.. IF cell A2 is equal to 1 copy paste special values in I2:J2 cells ( this cells are formula.. need to perform paste special to prevent it in updating)then IF A3 is equal to 2 copy paste special values in I3:J3 cells.same action till A31. Second scenario is if O2 cell has a value of 100% copy paste special as values formula in K2 cell, then if O3 cell has a value of 100% copy paste special as values formula in K3 cell.. same action till O31 cell. take note I manually input values in A2 TO A31 cells as well as on O2 to O31 cells. I want the macro to perform the paste special as values only when I put value in Cell A. and Cell O (CELL A and CELL O are not dependent to each other so they should function individually in the macro).
View 8 Replies
View Related
Jun 17, 2013
I have a few Excel files in use in my tv station's newsroom. The purpose is to allow Producers to enter text and then send that data to on-air character generators.
Here is the problem I'm running into: I have protected the sheets, which contain unprotected cells so the users can enter data....but if they copy something from a web page and paste it into the Excel file, that cell's formatting changes to include the html coding that was also (inadvertantly) copied.
How can I set up Control+V to ALWAYS act like "Paste Special/Values" so that only the text-content is pasted and the formatting of the cells in the my Excel files is not touched?
View 2 Replies
View Related
Jun 30, 2006
Sub import()
On Error Resume Next
Dim wb As Workbook
Dim c As Range
Dim rngTo As Range
For Each c In Range("D1:D10").Cells
Set wb = Workbooks.Open(Filename:=c.Value)
With Workbooks("DigitalTicketMaster.xls"). Sheets("All")
Set rngTo = .Range("A" & .Rows.Count).End(xlUp).Offset(1, 0)
End With
wb.Sheets("Combined").Range("A2:C100").Copy rngTo
wb.Close .............................................
we have a change on our sheet, make it easy for our guys. Column A, is the date. Today 6/29.
They enter it once at the top, and it pastes for them automatically (a simple cell = $E$1)
But now, when I use the macro, it pastes over the formula that I don't want nor need, and have to call the second macro for. But then everything in that column shoes E1 on my new sheet, which is not the date... and each sheet changes dates, so I can't just have the date all the same.
What can I do in my original code to still make it loop, pull all my pages that I tell it to, but paste values only?
Would it be possible, in my loop, to highlight my cells, on that sheet... A2:C100, copy them, paste themselves right onto themselves, as values only, then copy over to my new sheet?
View 9 Replies
View Related
Mar 4, 2007
Is there a short- cut key sequence for paste special value short of: Alt+E+S+V
or
Writing a subroutine in Personal.xls and giving it a shortcut key like:
Sub PasteValues ()
Selection.Formula=Selection.Value
End Sub
View 7 Replies
View Related
Mar 26, 2009
I am trying to come up with a formula that will count everything excluding 1 in one row, while looking at another row to determine the group.
The attached example explains things a lot better.
I am going to have 2 formulas. 1 for the "Big" group and one for the "Small" The formula needs to look first at the column that has the group in it. Then it needs to count everything is column A excluding "Snake" And return the value.
View 2 Replies
View Related
Aug 24, 2009
If I have multiple entries with different but repeatable text values in one column - how do I count all unique ones ? Is there a function or does it have to be a pivot table of sth ?
View 14 Replies
View Related
Feb 14, 2013
For some reason the following code, when executed, pulls a named range from the source workbook (sProj_Name). I feel like I have used this exact same code before and not encountered this issue. This named range is linked to the source workbook so if I save the file and re-open I get the wonderful 'would you like to update links' pop up. I cant figure out why, when I am forcing it to paste only values and formats, it is picking up this named range. In addition the source workbook has way more than one named range, so why it doesn't pull all instead of just one is a mystery to me as well.
VB:
With Workbooks(sProj_Name).Worksheets(2)
.Cells.Copy
Sheet2.Cells(1, 1).PasteSpecial Paste:=xlPasteValues
Sheet2.Cells(1, 1).PasteSpecial Paste:=xlFormats
Application.CutCopyMode = False
End With
View 2 Replies
View Related
Mar 18, 2014
I use to have a macro that could copy formulas from non contiguous ranges and paste the values in the same cells. So for example, I could select a non contiguous range like B5:B10, E10:F12, and G1:G10. The macro would then copy and paste the values in those 3 ranges, so those 3 ranges would be values instead of formulas.
I think it worked by storing each range and then looping through each range to copy and paste special values.
View 2 Replies
View Related
Nov 9, 2012
Not sure if it's me or a new change in excel 2010, yet creating a simple macro as listed below does not work.
Outside of macro I will select a range of data and copy.
Then, using macro I'd like i to perform: paste special values, in the current cell
View 5 Replies
View Related