This code counts all cells with a value from column B1:B:10, C1:C10, D1:D10, E1:E10, F1:F10, G1:G10 and H1:H10. And then give the cells of the 3 lowest outcomes a blue backcolor. The problem is that the code also colors any duplicate outcomes. How can I let the code skip any following duplicate outcome(s)?
I am trying to copy worksheets from a master workbook to numerous other destination workbooks. I would like the code to check if the destination workbooks already contain any of the sheets being copied and if this is the case, miss out that sheet and move on to the next. Currently, if duplicate sheets are present, a second sheet is created and copied to the destination file.
VB: Sub CopyTrend() Dim Filename1, sFileNameAndPath, sThisWorkbookName As String
I've been through the forum and I've got my VBA to check that columns 37, 38 and 40 are entered if column 2 = 'O'. However I just can't get it to exclude column 39 from the check! Is there a way of getting Case Else to do this or should I use an Array?
Dim rCell As Range Dim strMessage As String Dim RowCounter As Integer Dim ColumnsChecked As Integer
For Each rCell In Range("B14:B5000") RowCounter = rCell.Row If rCell = "O" Then For ColumnsChecked = 37 To 40 If Cells(RowCounter, ColumnsChecked).value = "" Then Select Case ColumnsChecked Case 37 strMessage = "COMMENTS" Case 38 strMessage = "INVOICE NUMBER" Case 40............................
In short, I would like a pivot table to only count unique values, but when I click into the pivot I would like to show all instances of that value. For example:
I have a table of data that I am creating a pivot table from. There are fields for Customer ID, Task Name, Age, and Notes. There will be multiple records for a single Customer ID each time it has new notes.
I would like to create a pivot table that has Task Name in the Row Labels, Age in the Column Labels, and count of Customer ID in the Values, so that, for example, I can see how many accounts have been in the Design task for 2 days. However, when I do this it counts each record, but I would like it to count each unique Customer ID. Also, when I click into the pivot, instead of pulling up one line per Customer ID, I would like it to pull up each instance of Customer IDs in that Task Name/Age combination (similar to doing a DISTINCT in SQL).
I have below a code that is selecting from A11 down as far as there is data and across a certain number of columns then sets a print area.
Currently the columns go A, B, JW, JX, JY, JZ, KA, KB as C through to JV are hidden. I have tried to offset the columns by 7 to see if it will select A-KB but it is selecting cells that are hidden and only selecting A-G. I need it to go past the hidden columns. Here is the code:
[Code] ......
Could I also get a code to go from A10 and move over to KB and create a range from there e.g. KB-KJ and last row from there?
I have a list of isometric drawing numbers ending with a [underscore]weld number e.g. 1692-SG-0040-04_05.
Some welds are repaired--in that scenario the amended weld number will be 1692-SG-0040-04_05R1, and even 1692-SG-0040-04_05R2 if repaired for a second time.
On occasion a weld may be cut out entirely and a new weld done. The weld number for that will be 6317-FG-1690-02_06C1.
And here's a wrinkle I've just verified...a cut weld may also be repaired so the weld number will look like 1698-SG-0077-01_04C1R1.
Is there a formula to count these as one weld: 1692-SG-0040-04_05 1692-SG-0040-04_05R1 1692-SG-0040-04_05R2
This as one weld: 6317-FG-1690-02_06 6317-FG-1690-02_06C1 6317-FG-1690-02_06C2
...and this as one weld: 1698-SG-0077-01_04 1698-SG-0077-01_04C1 1698-SG-0077-01_04C1R1
I am having trouble creating a function to count duplicates of duplicates.
An example of the data table 1 is:
Product 1 2nd Product 1 2nd Product 1 New Product 1 New Product 1 Flt Product 2 2nd Product 2 New Product 2 New Product 2 Flt Product 2 Flt Product 3 2nd Product 3 2nd Product 3 2nd Product 3 New Product 3 Flt
I created a new table (table 2) and made a list of all the Products on table 1 and removed the duplicates. I now have 3 columns with titles New, 2nd and Flt as follows:
New 2nd Flt Product 1 XX XX XX Product 2 XX XX XX Product 3 XX XX XX
I am trying to count the duplicates for each product (XX), but I can't seem to work it out. I've tried the MS help function, but unsure of the actual formula I need to be using.
I would like to be able to change the range from "B6:AP6" to something which will start with B6 but only count every 6th cell up to AP 6. I could probably place a symbol at the top of each column I wish to count if needed. If I try to simply choose every sixth cell I get an error about too many arguments for the countif function The above formula is used to add hours for various shifts (symbolized by letters). For my current need I do not need the multiplier i just need to count how many of each letter appear in every sixth cell of a row.
This may be too fancy but if one formula would work to count every 6th cell starting with B6 and give me a sum , then automatically do the same starting with B7 and count every 6th cell etc...that would be great. I am trying to sum the number of each occurrences of each shift at each of 6 locations.
I want to figure a class average for a test, but I have students that have moved. My Excel is automatically counting them as a zero. How can I program/tell Excel to skip any blanks rather than count them in the average?
I have few column values to count. I don't want the hidden column value. In that formula the hidden value also counted. How to ignore that hidden column value count, using macro/formula.
eg: col A - col B - col C - col D - col E - col F Task -- ok1 -- ok2 -- no1 --- ok3 -- ok4
Col D should be hidden. Final count result should be: OK = 4; No=0
I am trying to compile a count of dates using a numerical reference which adds x consecutive dates onto the initial start date based on the number in a cell.The dates added cannot fall on a weekend.
The start date for each calculation begins in D4 with the corresponding number of days to add onto this date in K4. In the example below 8/11/2007 -- 2 means that the 8th and 9th of Nov get one added to their count. As the next row also has 9th Nov as a start date one more is added to 9th Nov. As the 10th and 11th were a weekend they are skipped and the count starts again from the next Monday. I have enclosed a simplified worksheet with some sample data.
I'm looking for a way to count the cells in a specified range if the cell contains a timevalue (such as: 0:05 or 1:15). When a cell in the same range contains a normal value (such as: 1 or 20) it should not be counted.
What formula should i use for this?
I was experimenting with:
=CountIF(N4:N50,">TIMEVALUE(0:01)") and =CountIF(N4:N50,">TIME(0,0,1)")
Does anyone have a utility which can be used to select a specific column i.e. B:B, which then 'selects' all duplicate values in that column prior to deleting them ?
I have two worksheets. ws1 contains a large number of dates on column 3. ws3 contains around 20 dates on column 3.
I want to pick two dates randomly in ws1 that does not already exist in ws3.
Here is my working code, but it is really slow to process. How to optimize this code? Also I would like to add a function where if the macro is not able to find two random dates that aren't already in ws3 then exit loop.
VB: Set ws1 = thisworkbook.sheets(1) Set ws3 = thisworkbook.sheets(3)
lr = ws2.Cells.Find(What:="*", After:=[A1], SearchDirection:=xlPrevious).Row Set rvis = ws2.Range("c2:c" & lr).SpecialCells(xlCellTypeVisible) mynodate = 0
In my attachment is what i'm working with. In the first worksheet tab, "NOTBA 10 09", i need it to count what's in the other worksheets, minus the duplicates.
So C4 should be referencing to H3:H21 in the 04-Edmonton worksheet. The number it should be showing is 11, however it's counting 15 because there's 5 entries for CDAU034479. Is there a way for it to basically count what's in that column, minus the duplicates?
I am using a CountIf formula to flag duplicate entries in a column of data, in a Column I have "=COUNTIF(P:P,P1)" It returns a number equal to the number of repeats of the data in call "P1". I then sort by that column to isolate all rows which have duplicates in Column "P". The cell has "1" if there are no repeats, "2" if there is one repeat, "3" if there are two repeats, etc. What I would like is a formula which would put a "1" in the cell the first time it sees data, then something else when it sees repeats. That way when I sort, ALL the repeats will be together and can be deleted. Is that possible?
I have a column with something like 20 thousand rows. I would like a formula that basically checks the column for duplicates and numbers the sets of duplicates. So if there are 5 cells that are all "Server10" I would like for the formula to place a one next to all of those cells. And for the next set of duplicates it finds I would for it to place a 2 next to all of those cells. Essentially my end goal is to sort the sheet so that all of the matching duplicates are all together. There might be some simple filtering method here that I'm overlooking but if there is..... I'm overlooking it lol. And to be clear I don't want to eliminate the duplicates, I just want them grouped together.
I've attached a very simple example of what I would like the formula to do. The cells in the right column would be the result of the formula.
I have columns from A to AA and need to count the duplicates in at least 2 columns and accordingly need to give them values on the basis of their ratings (A, B, C, D) and type of work (book, article etc) given in yet other columns.
I tried COUNTIF, but that does not work for multiple perimeters I tried SUMPRODUCT, =SUMPRODUCT(($G$4:$G$3000=$G28)*($AA$4:$AA$3000=AA28)), but that only gives a multiplication of my input without the possibility of giving new values to the output.
I tried AND(IF( but that did not want to work either really...
I think the solution is ifsum, but I do not know how to use it in this scenario...
I know this all sounds a bit blurry, so let me attempt to make it more concrete.
Author Title Year Rating Type Desired outcome P Marx I 2005 I A I Book I duplicate A Hegel I 1923 I B I Article I - B Kant I 1674 I D I Book I - A Derrida I 2005 I D I Monograph............................
Is there anyway to make this work without having to enter a specific range. For example I want to count the duplicates in column U, but don't want it to count blank cells.
Here is my formula right now, and it works, but it counts all of the blank cells in the row as duplicates. How can I stop that?
i need to put serial no. without considering duplicate value.. i have ' N ' of value somewhere data is repeating when i am giving serial no i want to ignore duplicate value ...example given ... please see attached file..
I have teams in rows and players columns with their ID and then name so B2 would be 444 and B3 would be Johnson and B4 would be 429 and B5 would be Smith
What I want to do is run a formula that counts the duplicate ID's not names and then shows them in a list like below
Duplicate ID, Number of times in worksheet 444 , 23 411 , 21 211 , 15
I need a one formula solution to compare two columns for duplicates and count the number of matched pairs. Need to ingore blanks. Can have matched numbers or letters. Asterik denotes a blank (empty) cell. Also only consider the first matched pair if there are more than one matched pairs.
Col A Col B a b a * b c c d y x f f z f z
In this case I only want to consider a:a, b:b, c:c and f:f, resulting in the count of 4.
I am trying to work out how I can assign a sequential value to sets of duplicate data within a list. i.e. where I have duplicates in a list I want each of the duplicates (that are in the same set) to have a sequential number assigned and for that to start from 1 each time it discovers a new set of duplicates.
RED GREEN YELLOW PURPLE RED ORANGE BLACK GREEN RED
Where a colour is duplicated in the list I want it to have a sequential number assigned. When a new set of duplicates is found the numbering starts from 1 and sequentially increases. So the above data list would resulting in the following output
RED 1 GREEN 1 YELLOW PURPLE RED 2 ORANGE BLACK GREEN 2 RED 3
Have tried variations of the RANK function, but not sure how to get the sequential nu,bering to restart with each unique set of duplicates. I would also like to do this without VBA if possible using the built in functions.
I have data in two columns where column A is a name and column B might be a synonym or might just equal the value in column A. I want to count duplicates if cell A2 matches any other cell in column A or B, unless the only match is with cell B2. If cell A2=B2, but also matches cell A7 then it should be counted as a duplicate. I've searched through a lot of the threads and found a lot of useful information, but nothing that seems to do what I need.
Good Morning Peps (Oh thats for users in Western Europe, got to get this right!)
I have these 12 columns (Well there is 12 Columns but this forum's HTML is not showing the last two lol, would much easier if Office Web Components was able to run on Firefox): ...
Below is a range of data i am working with, i am trying to create a formula that will count the number of different entries in column A for each different entry in column B. ie how many differnt values are there for "Packing"
008003PICKING MISTAKE 008042UNFIT FOR PURPOSE 008035PACKING 008035PACKING 008035PACKING 007960CHANGE OF MIND 007986PACKING 007986PACKING 008050UNFIT FOR PURPOSE 008070CHANGE OF MIND 008070CHANGE OF MIND 008074CHANGE OF MIND 008074CHANGE OF MIND 008074CHANGE OF MIND 008074CHANGE OF MIND 008074CHANGE OF MIND 008086PACKING 008085PACKING 008085PACKING