[1] compare (row) ranges across two columns with an unequal number of rows (column A [number] to column C [number])
[2] save each result of [1] where there was a match in column B
[3] for each row where there was a match (now stored in B), compare the value from the same row in column D (date) with the same row of column F (date), and store the result in column E
[4] count and message box the final number of matches from column E
Data Example:
A B C D E F
----- ----- ----- ----- ----- -----
12345 match 12345 11/1/2011 match 11/1/2011
77777 34345 ... ...
A and C numbers match, so check same row date in D that does match date in E, place "match" in E, then count and display.
Sub other()
Dim range1, range2, range3, range4, range5, range6 As range
Dim x As Variant, y As Variant, z As Variant, a As Variant
I have 3 ranges in an excel sheet col 1 range contains a numeric value ("1" or "5") col 2 range contains a string value ("left" or "right") col 3 range contains a string value ("a" or "b" or "c")
example: I am trying to get a total count if col 1 contains either a "1" AND col 2 value is "left" And col 3 value is "a". Note: If col 1 is blank (" ") then the rest of the row is irrelevant. See attachment
I need to put a macro in the toolbar which copies data from another worksheet. The trick is I have several worksheets and want the one macro to pull data from different columns based on which worksheet is active. So I need to test the name of the active worksheet in my logic.
I've run into an issue where conditional formatting is working correctly 98% of the time, but 2% seems beyond logic. Basically if I have more than 120% of Stock Limit on hand I want the cells to turn green. To do this I entered the following Conditional Formatting formula in cell D4:
HTML Code: =((D4-$C4)/$C4)>=$E$1
I copied the formatting to all the other cells in the range, and most are colored correctly. This is what I get:
As you can see, it works correctly for the most part, however some cells, such as cell H5 in the example, that should be colored by they aren't.
My first thought was that this is an issue with the reference, because as I examine other cells it doesn't look like conditional formatting formulas are updated relative to that particular line, however that is the same case for my red formats and those are correct. I have over 50,000 rows so creating a new formula for each row certainly isn't the preferred option, neither is writing a macro to manually color them because of the processing time. I'm using Excel 2010.
I have 3 sheets. Sheets 1 & 2 contain lists of data occupying columns A to M. Although the data on these sheets generally will be different, there are occasions where sheet 2 may contain identical rows to sheet 1.
What I want to do is two separate things -
copy the duplicated rows to sheet 3, and then in columns N & O indicate the row numbers from sheets 1 & 2 where the duplicates can be found (this only where the entire row matches)
do the same as above, but only where the contents of columns I & J match (rather than the entire row).
take a look at the attached example and let me know how to make the formula work?
For each "title" in column A, I want to compare the two sets of start and end dates (columns B & C versus D & E) and if the date range in column B &C overlaps with the date range in column D & E, input "yes" or "no" in column F.
In my attached example, rows 8,9,11, and 12 would be populated with a "yes", the rest would be "no".
I'm on Vista with Excel 2007, HOWEVER, the solution must be Excel 97-2003 compatible.
I have two columns. One will a Y or N in it, the other will have a number. I need to sum the column with numbers, but I ONLY want the numbers added that have a 'Y' in the same row of the other column ...
I have a list of numbers which I need to compare to a range of numbers. Each number in the list needs to be compared to the range, and depending where it falls within the range, a particular cell needs to be referenced in the result. I've attached the xls with the explanation.
I was going to do this with a nested IF, but with a max of 7 this will not work.
Attached File : Help with comparing to a range.xlsx
I want cell B to be blank if 1 of 2 different conditions are met. If Cell A is blank then so too should be Cell B. If cell A contains data, then I want cell B to perform a formula $D$1-E6.
However, if Cell C contains data then Cell B should return to a blank status.
I have a collum (A )with numbers and in other sheet have a collum (B)with numbers too.. and some numbers match. what i want is in the cells that the numbers match have other colum and i want to copy that number to another cell.
I'm working with Excel 2003 on a peice for work that requires users to enter their current grade and, if they have one, a temporary grade. Another sheet in the workbook needs to add together all those in a certain grade and who answered a certain way to a drop-down table, so that I can use it to figure out what percentage of staff are of each grade. At the moment it looks like this:
Which only draws information from the current grade (column F) and the answer they give (Column K). What I can't come up with is a formula that will only take column F as long as column G hasn't got a temporary grade, but if it does have a temporary grade will take column G instead.
I'm going nuts trying to figure out what formula I could use to give me totals in columns Q and R of the attached file. Basically, in the Weekly Totals column, I want to populate how many Customers and Bags were handled according to each ship name (the data is in the table to the left). Any suggestions would be GREATLY appreciated, I'm taking stabs in the dark but am not coming up with anything that works.
I have 2 worksheets - one is a monthly update, the other is last month's data.
I want to highlight the changes on the monthly update sheet using conditional formatting.
I named the columns as ranges on the "last month" worksheet, and then used =Match(A1,Jan,0) (wheras Jan is the range on the "last month" worksheet where A1 resides)
What formula do you use to say "if A1 does NOT match a value in range "jan", then format it"?
I would like to compare each cell in a spreadsheet to the cell on its right.
If the numeric value of a cell is less than the numeric value of cell on its right, I would like to highlight the cell on the right light red.
Maybe a better way of putting that is if the value of a cell is greater than the cell on its left, highlight it light red (The problem I foresee with this formulation is in the first row where there are no cells to the left).
(Core starting issue solved but other threads were created to continue with trouble spots.)
I'm terrified to use VBA just yet, so right now I'm determined to highlight values in my spreadsheet just using conditional formatting.
I have 5 plus 1 columns of data. For example,
A B C D E....F 3 2 4 5 7....2 4 6 1 3 4....1 4 7 4 5 8....4 2 1 5 3 9....1
I successfully applied a MIN formula to compare between columns on each row and display in F the MIN value. Notice each cell going down F has the minimum value in analyzing across each row.
Now, I *also* want to apply a formula on the whole F column to compare these resultant MIN values and give me the MINIMUM value between those as well, so now I'm comparing across rows. Got it? Now then.....I want the ENTIRE row that has this MIN value in F to be highlighted, because that will be the best choice for the application of what I'm doing. Did you understand this paragraph. It might have been confusing, but I think I said everything correctly, so read it carefully.
I've tried all sorts of "Formula is", "Cell value is", dollar sign this, dollar sign that, no dollar sign this, <, >, =, highlighted ALL the block of data, highlighting JUST the column across the rows of which will be compared, only highlighted one cell, but nothing has worked.
Is my problem that you can't have 2 formulas in one cell? So then I thought I should ADD another condition, but nothing works.
Let me throw in one more element that I did not state. If anywhere down the F column there is a 0, I don't want that to be my minimum. I want it to evaluate and give me the minimum value greater than 0.
Please read everything I wrote carefully. It might be confusing, but I hope someone has an answer, because it sure has frustrated me.
Now, I'm thinking that VBA programming may give me answers, but I am so terrified of macros, I don't know how to begin that. I have this impression based on the many sites I've looked at on the internet that many people do macros and it's quite easy, but it's funny to me that I am so scared. There's something about me freaking out that I won't have a period or a quote in the right place and I'll stress my day away over it.
i want to compare between these two table based on the condition writen in RED. IF there is a mismatch i want to highlight the values in the first table.
I'm trying to do is develop a formula to: - look at one column in sheet 1 and if a value in that column equals a value in another column in sheet2. then, display an X
I have created a sheet which has 52 named ranges representing the week numbers.
I would like to apply VBA Conditional Formatting to each week with the following if a cell is empty colour the interior Green if not empty colour the interior Red.
I have two excel files. The data is arranged by column. I want to take 3 or more cells (from three different columns) from a particular row and match them up with three cells (in 3 different columns but in the same row). The three cells should be in the same row. However the matching row may appear in a different order in each of the two lists. When Excel finds a match, I want it to return true. How can I go about doing something like this?
I have attached a file explaining what I mean. I am trying to match the three cells in list one with three cells in one of the rows in list 2. However the number of cells in each list is different and there are some cells in list 2 which are not in list 1 and vice versa. There may also be extra columns, which I have not included for the sake of simplicity.
I have data in column A which is the correct data. I also have data in other columns that I would like to compare to column A. If the data is the same, then it moves beside it, if not then it leaves a blank cell.
I have looked for macros and formulas to do this for ages but i cant seem to find one. Here is an example
BEFORE
A B C D 1 1 2 1 2 4 3 2 3 5 4 4 4 7 5 6 5 - - 7 6 - - - 7 - - -
AFTER
A B C D 1 1 - 1 2 - 2 2 3 - 3 - 4 4 4 4 5 5 5 - 6 - - 6 7 7 - 7
See the attached spreadsheet. the range D5:D20 is dependent upon the value entered in D2. the range K4:K64 contains all values I would like entered into D2. For each value entered in D2, the range E21:H21 calculates 4 statistical values. I would like these entered into the 4 columns in Table 2 (L,M,N,O). The first value has already been done. Can I automate this somehow to plug in all the threshold values I have listed in Table 2 (column K)???
I am trying to apply conditional formatting to the range K60:R82 based on their corresponding cell in the range K87:R109 (the arrays have the same size). If each cell in the first range is greater than their corresponding cell in the 2nd range, then the cell in the first range should be formatted with pink fill and red text.
Any way write a conditional format formula to shade a cell based on two ranges.
Here is what I need:
cell b4 should be colored in if n4:xfd4 = today's date AND n3:xfd3 = "Time Off". The part I am having trouble with is that it should only shade if today and time off are in the same column.
Here is an example:
This one should shade B4(note: Today is 08/13/2013):
time off late
08/13/2013 08/10/2013
This one should not:
late time off
08/13/2013 08/10/2013
This is what I came up with so far, but it shades the cell if either show up in the entire range:
=AND(MATCH($G$1,$n$4:$XFD$4),MATCH($H$1,$n$3:$XFD$3),1) Note: g1 contains =today() and h1 = "Time off"
In Excel 2007, is there a way to copy a conditional format from one cell to a range of cells. My conditional format is comparing the value of one cell say A1 to B1, and formatting the cell if the value is different. How do I copy this format to also compare A2 to B2, and C2 to D2 etc.
I am working on a survey analysis and I'm having trouble comparing two columns.
Ex. 100 surveys Column A being age (scale of 1-5) Column B being willingness to pay (scale 1-5)
I am trying to correlate age with willingness to pay by saying =countif(a1:100 = "1" and (B1:B100 = "1" and "2")) Basically checking to see if the 1st age group has a strong willingness to pay; I would repeat with B1:B100 = "4" and "5".
Is it possible to modify the sub "Continue" below so that the "If s.Name <> wsKeep" line compares multiple variables? The code is for the purpose of setting a workbook to a required state, i.e. hide all worksheets except ones stated in variables. I have further subs that would also benefit from me knowing how to do this.
I have a spreadsheet containing donation data for a non-profit organization with over 25,000 rows. The spreadsheet contains a lot of data, and is sorted by donor name, donation date (when the donation was made) and the feedback date (feedback on how the donation was used).
I'm looking to analyze how many transactions were made by a donor within 10 days of receiving feedback for a previous donation. The condition to check for is
(donor name is the same) AND (donation date >= feedback data for a previous donation) AND (donation date <= feedback data for a previous donation + 10 days).
How do I best perform this comparison? For instance, a donor may have made 20 donations, so I need to compare these donations amongst themselves and flag the ones where the donation date within 10 days of the feedback date for any other donation. I need to perform this exercise for each individual donor.