Highlighting The Row Or Certain Columns When Criteria Is Met
I need a formula that will highlight the entire Row when the criteria is met.
If Cell In column A = "Management" Then
Rows().Select
Row.Font.Bold = True
End If
If Cell In column A = "Scotia" Then
Rows().Select
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
End If
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Sum Of Columns When Criteria Is Met
1) If B1:2008 is "EA" (and so on for about 7 other classes) then count how many days are entered in G8:2008 so a cell on a seperate distribution sheet tells me how many sickness days in total have been taken by EA's (and then the same for the other classes).
View Replies!
View Related
Delete Whole Row, If Criteria Is Met
I've got a menu in which the user has a checkbox with 3 choices. Choice 1 = Red Choice 2 = Blue Choice 3 = Green My macro looks at what the user selected and then goes through a column on the spreadsheet - for example say the user only checked Green. In this case, a variable would be set to 001 (if they checked blue and green the variable would be 011...). The then macro goes through coulmn x and whenever there is a "Green" in column x, it selects the row, deletes it, and evaluates column x's next row. My problem is, that I'm not deleting all of the rows with Green in column x. I've set breaks throughtout the code and the variables are all set correctly, I've checked for spaces before/after "Green" in the rows not being deleted, and nothing seems to work. Here's my code: Case Is = "001" Do Until IsEmpty(ActiveCell.Value) If ActiveCell.Value = "Green" Then ActiveCell.EntireRow.Delete End If ActiveCell. Range("A1").offset(1, 0).Select Loop
View Replies!
View Related
Copy Row When Column Criteria Met
i have is a sheet with abotu 1000 rows of data and 21 columns. I want to scan column E for 13 different criteria types. If the criteria is met, then I would like to copy the same row of data. here's the catch, I dont want the entire row of data, I only want about 10 of the rows. I want these to be pasted onto other sheets in the workbook. Another problem I have run into is, IN column E, there are some spaces in soem of the rows. This has led to problems I have found in other solutions i have tried. I am familar with VB some, if i can just get pointed in the right direction I think we can get this figured out.
View Replies!
View Related
Loop To Delete Row When Criteria Is Met
I am using this to delete rows from my excel sheet. I basicaly start my script by placing xxx in cell B2000. I want to optimize my code and maybe some how tell excel do until last cell. I am playing with: "Do Until lLastRow = Range("B" & Rows.Count).End(xlUp).Row" But not shure how to procede with this. Range("B1").Select Do Until ActiveCell = "xxx" If ActiveCell = "Ticket" Then ActiveCell.EntireRow.Delete Else ActiveCell.Offset(1, 0).Select End If Loop
View Replies!
View Related
Move Data Row When Criteria Met
I have a spreadsheet with when column K is Yes I need to move the data on that appropiate row to the corresponding worksheet in the same workbook. I have the button working but it moves the data in the row if No is in column K which is what I don't want. It also moves - removes the variables but I guess that is another question for another day.
View Replies!
View Related
Deleting Multi Rows If 1 Row Criteria Met
I have attached a sample of my data. What I am looking for is the best (most elegant solution) to my problem. I am trying to create a macro where I have 2 sheets. Sheet 1 will contain my data, sheet 2 will contain a single column of criteria to search through sheet 1. I would like for the macro when it finds that criteria, it will delete all rows of data that is tied to that ORDER_NUM Schedule EFGHI1ORDER_NUMAREADL_DATESHIP_CODEPART2113510395CANADA EMPACT20100108IN445N3113510395CANADA EMPACT20100108IHT9534113510395CANADA EMPACT20100108ID981C5115436953CANADA EMPACT20100110IPMDMN6115436953CANADA EMPACT20100110IN246F7116292017CANADA EMPACT20100111IY1G0M8116411203CANADA EMPACT20100111IT571R9119169642CANADA EMPACT20100113I9M62C10119169642CANADA EMPACT20100113IT272C For example, it my criteria was part N445N, I would like for it to delete all rows of data that is tied to that ORDER_NUM (113510395). Desired Output Schedule EFGHI1ORDER_NUMAREADL_DATESHIP_CODEPART2115436953CANADA EMPACT20100110IPMDMN3115436953CANADA EMPACT20100110IN246F4116292017CANADA EMPACT20100111IY1G0M5116411203CANADA EMPACT20100111IT571R6119169642CANADA EMPACT20100113I9M62C7119169642CANADA EMPACT20100113IT272C
View Replies!
View Related
Highlighting Active Cell's Row, Along With Any Row That Shares Same Value In That Column
Is it possible to click on a cell in column C, and have the wishlist below happen: That active cell's row is hightlighted. Any cell in that column that has the same value as active cell is also highlighted. Plus, any cell in another sheet that has that value it's row is highlighted too. Example: I click on C5 in Sheet 2 its value is 45000789 it row is highlighted, this value also appears in C3 in the same sheet, so it's row is highlighted as well. Plus, in sheet 1 in C10 this value appears and it's row is highlighted as well. When any of the values are clicked again the highlight is removed from all parties.
View Replies!
View Related
Delete Columns After Finding Criteria In Row
I am trying to delete columns or clear their contents after I meet a certain criteria in row 4. For example: I have one " Total" in row 4 that can be in any column. I wanna be able to delete whatever comes after "Total" in any row or column. Is there a macro that can do that?.......
View Replies!
View Related
Highlighting Filtered Columns - Automatically
I have been trying to find a way to highlight columns that are filtered in Excel. On a laptop it is not always that easy to tell which columns are filtered. I have found a piece of VBA that can do this (see http://www.vbaexpress.com/kb/getarticle.php?kb_id=365). I would like to do two things: 1. Have this run whenever an autofilter is changed (a new filter chosen or a current filter changed). 2. Have this effective for every workbook that I open. I'm hoping that someone can help a VBA newbie sort this out.
View Replies!
View Related
Lookup Row And Column As Criteria But Data Is Spread Across Columns
I need to bring in values into one worksheet from another worksheet using row 1 and column A as criteria. I have previously done this using Sumproduct. However the complicated issue with this new worksheet is the setout. The source worksheet (see attached) has the actual data spread across columns. How can I bring in the values to the 'Summary' sheet from the '0607' sheet using the Employee number and the seg code as 2 criterias to lookup and bring in the resulting data (which is spread out in the purple area in the '0607' worksheet).
View Replies!
View Related
Conditional Formatting Of Dates - Highlighting Of Columns
Well I spent some time yesterday trying to figure this one out. It was only last week that I have taught myself how to use VBA in excel. However this looks like a though one. Simply what i would like to do is highlight a column of a certain date (till a certain row number) based on a list of dates. eg. Across the top I have a set of dates and on another sheet i have a list of dates. I understand that there is a VBA code for such conditional formatting but i can't get my head around it.
View Replies!
View Related
Comparing 2 Columns, Highlighting The Higher Number
I am trying to do is I have column C and column G. For each row, I want to highlight or change the font color of the greater number. I can do it with conditional formatting, but I am only able to do it for 1 row at a time and it will take forever considering there are over 800 rows. Is there an easy way to compare the two columns and highlight or change the font color of the higher number in that row? For example: C G 4 5 8 1 6 2 9 11 So it would highlight the 5 in the first row, the 8 in the second row, the 6 in the third row, and 11 in the fourth row.
View Replies!
View Related
Counting Until Criteria Met
I am looking for help on 2 aspects on my spreadsheet. My Spreadsheet looks as follows: My first query is - How can I create a formula which will show in cell G3 the amount of cells from a number value in f3 (inclusive) down until the next number value is reached (but not including it)? So for the first instance - it would be f3 down to f14 - which is 12 My second query is a little more complex... I am looking to display - for the same criteria above - all entries in column B in their own seperate cell. So for the first number - it would show 02B:D5 in cell H3, 15B:C5 in I3 and so on...
View Replies!
View Related
Highlighting Entire Row
This problem has been driving me insane, as I thought it wasn't possible to do in excel however this morning I accidentally pressed a shortcut key on my keyboard and what I wanted, happened.. pity I can't remember how I did it. How do I highlight an entire row, but remains highlighted when i enter info in the cells until i move down to the next cell? Eg. I click on row"1" so that all cells are highlighted, then while entering info in B:1 - the entire row is still highlighted? This will be very useful in my line of work. I know there was some information on conditioning formatting, but surely there is a way to do it via keyboard shortcut since i accidentally did it just before.
View Replies!
View Related
Freeze Value In Cell If Criteria Is Met
Just wondering if its possible to achieve the following please: If Y5=U5 then place text "High" in cell Y4 and If Y6=U5 then place text "Low" in cell Y4 BUT how can i make it so that once the above criteria is met, and the relevant text is placed in cell Y4, how can i make it so that it Keeps that Value in Y4 now (even if Y5, U5 or Y6 change afterwards)?
View Replies!
View Related
Formula To Sum If Criteria Is Met.
I have this range of data, but I am trying to summarize it and add it back to another worksheet in the same book. ******** ******************** ************************************************************************>Microsoft Excel - Enterprise_Demand_v0 4.xls___Running: 11.0 : OS = Windows XP File Edit View Insert Options Tools Data Window Help AboutA1=ABCD1PartHub CityINV21X023EAGLE_NASH_EG3Nashville14031X023EAGLE_AUSTIN_PN3Austin320041X023EAGLE_SPHOhio50051X024EAGLE_AUSTIN_PN3Austin218061X024EAGLE_NASH_EG3Nashville226071X024EAGLE_SPHOhio134086878TEAGLE_AUSTIN_PN3Austin1190096878TEAGLE_NASH_EG3Nashville900106878TEAGLE_SPHOhio5001178PEPEAGLE_AUSTIN_PN3Austin500Hub_Dmd [HtmlMaker light Ver1.11] To see the formula in the cells just click on the cells hyperlink or click the Name boxPLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR. What I need to do is SUM the INV if the city is Nashville. I've tried Subtotal, sumif, etc.. I have never used any of these functions, so I would appreciate some help figuring out the formula to use. The formula will be a part of a larger macro.
View Replies!
View Related
Spread Values When Criteria Met
I have worksheet where I would like to apply a number value proportionately throughout a column bases on user-defined conditions (i.e. >=, <=, Between) from other colunmns. See example below and attached worksheet with further detail. Col A Col B Col G Col L Col M 01380Employee 15.0 5.5 (0.8) 00304Employee 24.0 - (0.8) 01901Employee 33.8 (1.0) (0.8) 01729Employee 43.0 - (0.8) 01482Employee 53.0 (1.1) (0.8) 00299Employee 62.5 - - 00069Employee 72.5 0.5 - 01783Employee 81.5 - - 02076Employee 91.0 - - 01934Employee 100.5 - - TOTAL 4.0 -4.0 In the above example, I would like to have the TOTAL value of Column L (4.0) be inversely spread throughout column M based on criteria selected by a user in a section of the spreadsheet. Criteria: Column G >= 3 AND all values in Column L = 0; Spread -4.0 (Inverse of cell L12 = 4) in column M for records that match criteria. I would like to have a command button apply the logic of the conditional criteria set for Columns G & L and spread proportionately ithe value from n Column M. I added examples of the different criteria and the layout in the file attached.
View Replies!
View Related
Summing Numbers When Certain Criteria Are Met
I would need to get this next thing working: H I J K L M N O P Type No. No.Points Points/RN Points/KR Points/KV Points/ER R/V Total 5 KV 12 4 2 3 4 6 0 8 6 RN 90 18 3 4 5 8 0 26 7 KV 12 4 4 4 5 6 10 13 8 ER 9 KV 10 KR ...and so on, with the following logic If Type = KV, then P$ = sum(J$,M$,O$), but if it is something else, like RN, then it needs to sum J$,K$,O$ I've tried using the following: =IF(ISNUMBER(SEARCH("KV";H2));SUM(J2+M2+O2);0;IF(ISNUMBER(SEARCH("ER";H2));SUM(J2+N2+O2)); but only the two first ifs work, which is kind of logical, since the second if is the "value if false" statement. Is there any way to get this to work?
View Replies!
View Related
Shade Cell If Criteria Is Met
I have a work sheet that has a date in a cell B7 and the system Date is Cell AB4. What I wish for the sheet to do is shade the cell depending on the following criteria: If the date in Cell B7 is 2years and 10 months Before the System date to shade it Green, If the Date is Between 2 years 10 month and 3 Years before the System date shade yellow and if it is 3years and over shade Red. For example if the date in B7 is 11-12-08 and the system date is 13-01-09 then the cell will be shaded Green.
View Replies!
View Related
Highlight The Cells When Criteria Met
=IF(AND($P2="Yes",COUNTIF($L:$L,L2)>1,$Y2="Market Specific"),TRUE,FALSE) But it is not doing exactly what I want it to, and I am struggling to work out what I need to change to get it to do so. I want the formula to do is look at a three Columns of data, and to highlight Cells in Column Y when the following criteria are met: The Row is active (determined by the "Yes" part), that the Row is "Market Specific" and that there is more than one Row where these Criteria are met (this is where I thought COUNTIF would work, but it's not).
View Replies!
View Related
Count Cells Until Criteria Is Met?
What I need to know how to do, is automatically count, in column 'd', the number of days its been since the number in column 'c' (same row) has shown up in column 'b'. Attatched is an example of column 'd' already filled in with the correct answer, however, I want it to be calculated automatically.
View Replies!
View Related
Return Value When Criteria Met From Another Cell
I have the name of an employee in cell B5 that I choose from a list. In cell L18 I have the result of the quality monitoring for this employee for a certain task. Now I have a seperate spreadsheet where I need to come up with individual performance scores. What I need to do is return value in L8 if B5=the agent I'm looking for. This also means that I would need to be able to do this on multiple cells in the same sheet. I've tried: =IF('[Workbook.xls]Sheet1'!$B$5=Name Employee,'[Workbook.xls]Sheet1'!$L$8,0) But I get a #name error and being pretty new to this I have no clue what to do next.
View Replies!
View Related
Color Interior If Criteria Is Met
I have some code that recently I found I had a new criteria that I originally did not have when I worked my original database. THis code works perfectly as is BUT if in column "D" if this is blank I would like to do nothing/ make no changes in that row. Sub ChangeColorsotherdesigXXX() Dim c As Range For Each c In Range("D2", Range("D65536").End(xlUp)) With Range("a" & c.Row & ":s" & c.Row) If Not CStr(c.Value) Like "612#" And Not CStr(c.Value) Like "712#" Then .Interior.ColorIndex = 36 .Font.ColorIndex = 1 End If End With Next End Sub
View Replies!
View Related
Highlighting The Row With The Selected Cell
I work with many sheets that have many data columns and have used a "greenbar" formula in conditional formating but would like to have a similar formula that highlights the current row. If possible, it would be nice if this new formula would not wipe out all other formatting as it moves. I have seen Ivan's work at www.mrexcel.com/hof001.php but it says that it wipes out other formatting. The formula that I am currently using is =MOD(ROW(),3)=2 Is there a way of getting the current row number so that it could be =ROW()=(current row number) ?
View Replies!
View Related
Delete Cells Content If Criteria Not Met
I have a long list that has all the services from our stores. I´m using the formula below to count how many services does each store have that are over 20 days old. =SUMPRODUCT((G!$A$2:$A$6000=$B4)*(NOT(G!$I$2:$I$6000="Valmis/Odottaa nouto"))*(NOT(G!$I$2:$I$6000="Valmis, toimitettu"))*(NOT(G!$I$2:$I$6000="Finished/WaitingDeli"))*(Päivämääärät!$C$1-G!$C$2:$C$6000>Päivämääärät!$I$3)) Now i´m wondering is it possible to make a macro that would delete all the cells in the range that do not match the criteria of my formula? With one exception in sheet G cell A2--> has the number of the store. There are over 40 stores so each store has a number 10, 20, 30, etc... This is the part of the formula that determines witch store it is counting (G!$A$2:$A$6000=$B4) B4=10 in this case and B5 would be 20 and so on... By modifying that one part i can count old services for all of our stores. Now I want the macro to delete all services from the list that are not over 20 days old and belong to the store 10 (B4). If it would delete everything that dont match that formulas criteria i could not get a list of old services for our other stores. What i´m trying to accomplish is get a list of the services that are over 20 days old. I´m now picking them from the list by hand and that takes a really long time. Because of the number of the stores and the size of the range.
View Replies!
View Related
Multiple Criteria Met In A Sumproduct Formula.
I have 2 columns of data being populated by vlookups Column H is both numbers and text. Column I is Text and blanks. I need to be able to find only numeric values in column H greater than 0 and compare those occurrences with the corresponding cells in column I and if column I has a text entry (not a blank space) than to count that and at the end give me a total number of times these 2 criteria are met. As an example. If column H has a text entry then don't count it. If column H has a number less than zero then don't count it. If column H has a number greater than zero but column I is blank then don't count it. If column H has a number greater than 0 and column I has a text entry then count it. I've tried using many variations of a sumproduct formula and none of them work. This formula counts all instances where column I has a text entry without checking column H for a number greater than 0. =SUMPRODUCT(--(H2:H110>0),--(I2:I110<>" ")) Or it's possible that the formula is counting the text entries in column H as a number greater than 0 but I'v tried excluding text using this.. =SUMPRODUCT(--(H2:H110>0&<>"*"),--(I2:I110<>" ")) but this causes an error in the formula somehow that I can't figure out. I even tried this =SUMPRODUCT(--(H2:H110>0&"*"),--(I2:I110<>" ")) and I get a formula that counts only the times text appears in column H and column I together which is not what I want either. I'm self-taught on Excel so I know there's a lot I'm not understanding about creating formulas like this but I need to have this working by Friday and I just want it to work.
View Replies!
View Related
Sum With Multiple When Two Ranges Or Criteria Are Met
What I'm looking for is that it ADDS the values, when 2 or more ranges and criteria are met. I don't think it's possible through the SUMIF because it allows "range,criteria,sum_range." But I know there's another way around, if so, please demostrate in a basic formula. Like.. I have something on A:A (name) and B:B (points), and the formula must meet the 2 ranges & criterias (name & points) to add the values in C:C (money).
View Replies!
View Related
Compare And Display Data With Met Criteria.
I have a Workbook that contains 2 sheets. One of them has a list of customer codes in one column, product codes in the next and product description in the last. The second sheet has a list of customers with their respective codes next to the names. I have a buton that when pressed asks to select a customer code from the second spreadsheet. After the selection is made a new sheet is created and that code is displayed there. This is as far as i got. What i would like to do next is loop through the 1st sheet looking for the customer code that has been selected and in the newly created sheet display the product code and description that is next to that particulare customer in the first sheet. I'm sorry if my description is a bit fuzzy im just very tired. I will atach the spreadsheed with the vba code tha i have so far. Thnak you in advance to anyone that would be willing to help.
View Replies!
View Related
Paste Rows Into New Sheet When Criteria Met
I have an example spreadsheet attached which contains 5 sheets. The 1st sheet ("raw data")contains the master data and the other sheets (which are blank at the minute) are the destination sheets. I'm after a macro that will iterate throught the "raw data" sheet and when it finds the first cell in column B that starts with 'POPRS' it copies and pastes this and the remainder of the row (through to 'H') into the new sheet 'POPRS' and continue to do this for all instances where column B cells start with 'POPRS'. Likewise with the rest of the Grades in this 'Raw Data' sheet.ie Instances of PORAW,PORTP,POPRS etc. Column 'A' must be pasted also
View Replies!
View Related
Between Formula: Give A Whole Number When A Certain Criteria Is Met
I am trying to do something for a baseball game I am creating. What I am looking for is a formula for one cell that will basically give me a whole number when a certain criteria is met. I am also looking for this cell's formula to get part of it's formula from another cell in the document. So let's use cell A1 has 1.50 in it. I want this other cells formula to be able to give me a 9 if A1 is 0.00-1.50, a 8 if A1 is 1.51-2.79, 7 if A1 is 2.80-4.30, a 6 if A1 is 4.31-5.49 and 5 if A1 is 5.50-500.00.
View Replies!
View Related
Sum Only If Multiple Criteria Is 1st Met
Have tried SumIf but still not good enough. The formula I'm looking at is to sum up 2 or more column if the below criteria matched: 1) Cell A1 = Cell A2 and / or Cell A3 2) Cell B1 = Cell B2 and / or Cell B3 3) Cell C1 = Cell C2 and / or C3 Which formula should I use?
View Replies!
View Related
Automated - Add Comment If Criteria Met
I have attached a work book that has 3 sheets. Basicly I have 2 columns of records on sheet 3 that may or may not match Sheet1 has one set of those records. If on sheet3 the records in each row to not match I want a Comment added to that row on sheet one with the opposite value. I have make Comments to walk you thru want I would like on the workbook and have made and example comment of row3
View Replies!
View Related
Highlighting A Row And Having That Data Tranfered To Another Worksheet
I have 1 Excel Doc that has 3 worksheets (DATA, COVER, TPA). DATA is where i input the data and COVER and TPA are where the data needs to end up. both COVER and TPA are standardized sheets that i do not change...only the data coming in will change. How can i make it so that whatever row in DATA i highlight, that row's data will be entered in to the correct spots on both COVER and TPA. when i highlight a different row, then the data will change to that row's data in both COVER and TPA (hope i'm explaining this correctly). right now i can only do 1 row by using (=DATA!$D$2). basically i want the '2' that is representing the row to be whatever row i have highlighted. if i highlight row 51 i want the formula to read (=DATA!$D$51). can anyone please help. i can put up a copy of the spreadsheet if need be, i am just hesitant cause of the confidential info. i would need to change the names and numbers to protect the innocent.
View Replies!
View Related
A Macro To Search And Change A Cell If Criteria Is Not Met
I have gotten good modifying existing ones to fit my purpose but still have a lot to learn about creating them. I would like help in creating a macro that would search out several sheets (JanD.....DecD) and search for names in column K and a location name in column L. If the contents of the cells do not meet the criteria of name and location then I want the name to be changed to "OTHER".
View Replies!
View Related
Conditional Formatting To Return The Following Results If The Criteria Is Met
I have a conditional format that does not seem to be working for me. Cell B2 has a drop down optionSelect, No, Yes); Cell B3 is supposed to be conditionally formatted to return the following results if the criteria is met: If B2 is equal to No or Yes then colour should become Yellow If B3 is >0 then colour should become Blue The problem is when B3 is greater than 0 it does not change the cell colour to Blue. B3 Conditional Format #1 is =AND(ISTEXT(B2),B2<>"Select") turn background to yellow B3 Conditional Format #2 is =AND(ISNUMBER(B3),B3<>0) turn background to blue See attached for spreadsheet with conditional formats
View Replies!
View Related
Run Macro When Cell Condition/Criteria Met
Two ranges A1:A20 (input values) and B1:B20 (results). Input values are always the digit 1 which starts the calculation and the result comes up in the cell to the right. Example: Input (1) in cell A1 gives a result value in cell B1. Input (1) in cell A12 gives a result value in cell B12. I need a macro “StartCalc” to do the following thing: Go to cell A1. Put in the value “1” Check the result cell B1. If “result value” > 20, then run macro “Test” (this macro is working) Go to cell A2. Put in the value “1” Check the result cell B2. If “result value” > 20, then run macro “Test” (this macro is working) ……. Go to cell A20. Put in the value “1” Check the result cell B20. If “result value” > 20, then run macro “Test” (this macro is working) End of macro.
View Replies!
View Related
Match Columns To Check If Condition Met
If you open the attachment.. then you will see that Column A has all the names and Column B has it's Value.. likewise.. Column D has all the names and Column C has it's values...I'm trying to first match the names from Column A to Column D and then see if Column B matches to Column C..
View Replies!
View Related
Serach One Column And Enter Text In A Differnt Colunm If Criteria Is Met.
In worksheet "Details" search down column "A" looking for any text/numbers. If there is something entered in the cell then look at column "M" for the same row and if that cell is empty inset "0%" in the cell. Example: Cell "A1" contains 12345. Cell "M1" is blank. The macro would inset 0% in "M1". Cell "A2" contains 54321. Cell "M2" contain 40%. The Macro does not modify that row. Cell "A3" is blank. The macro does not modify that row. Cell "A4" contain 65478. Cell "M4" is blank. The macro would inset 0% in "M4".
View Replies!
View Related
|