I am trying to find a solution for highlighting cells in a column that are repeats, ie. >3. I also need these cells to only be highlighted if the adjacent cell in the next column contains specific text. I have tried using conditional formatting with a countifs formula to no avail.
I have some specific procucts in coloum A in sheet (data), If that product was found in Sheets("allproducts"), copy all the rows and create a new sheet on the product name and save the excel.
Sub SearchForString()
Dim LSearchRow As Integer Dim LCopyToRow As Integer
I have some specific procucts in coloum A(a2, a3, a4, till a50) in sheet (data), If that product was found in Sheets("allproducts"), copy all the rows and create a new sheet on the product name and save the excel.
I want to delete any/all rows from a worksheet (named UK) which have the word "VAN" in column P. I have tried using a 'For Each... Next statement' in a macro, but always get a debug box "Run Time Error '91' Object variable or With block variable not set". What am I doing wrong? my code follows
Sheets("UK").Select Dim cell As Range For Each cell In Worksheets("UK").Range("P10:P200").Cells Cells. Find(What:="VAN", _ After:=ActiveCell, _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ SearchOrder:=xlByColumns, _ SearchDirection:=xlNext, _ MatchCase:=False, _ SearchFormat:=False).Activate Selection.EntireRow.Delete Next
I am trying to have rows moved from (Schedule) to (Complete) in the attached workbook. The criteria to have the row moved would be the user-selected "Status" list changing to "COMPLETE" in Column G.
I would like to have the row cut and deleted from Sheet4 (Schedule) once "COMPLETE" is selected from the list in Column G with rows below moving up. The row would then be inserted into Sheet2 (Complete) at the top of the list (Row 7) and rows would move down below the new entry. I would also like to have the formatting remain uniform (every other row fill)
I have a macro that converts all my PDF Purchase Orders to a text file and inserts the data/text horizontally into another document. However because the PDF's or the text within the PDF can be fomatted differently (that is on different lines etc) it therefore imports the information and it looks mis-aligned.I have attached a simple spreadsheet showing some sample text as it is imported and then below this how it should look like, all in line.
The range where the highlighted text in red is, is variable (but say nothing more than a variant of 10 columns). The text can also be Uppercase or Lowercase.So, I was wondering if there is macro code to find the "text" on various rows/columns and align it all in another column?
Take 5 PPE Swabs per Area, Both Shifts. Test various equipment - hands, aprons, sleeves, hats, etc.
What I need is for "Take 5 PPE Swabs per Area, Both Shifts." to be bold and highlighted in gray, but none of the other text. Conditional formatting highlights the entire cell, which won't work.
I'm finding it hard to explain what I am trying to do (which may be why I can't find a solution through Google), so I have an example. I am using a much larger spreadsheet than this sample(18,000 rows)
ID First_Name Last_Name Company
[Code]....
I want to highlight rows if there are multiple instances of ID and # values - I included a column at the end showing which rows in this data set would be highlighted.
Code that will highlight a entire row when a cell from a column has a value of 0. It will check all the cell from Column C1:C100 and check all the cells that contains a 0 value. Need to highlight the entire row that contains this cell value and fill it in orange color.
I would like to find a way that will look on a worksheet for a specfic word and highlight all the rows that contain this data.
Column A - Has the wording "JOB" & "WORK"
I want this to look down column A find all the rows with the word "JOBS" and just highlight them rows, i dont want a highlight like conditional formating but a highlight like when you click on the entire row.
Currently I am using the Kickbutt VBA Find Function of Aaron, but I would like to have something that works more efficiently. What I currently do is (assuming all possible values for Column J are A - F):
although I just want some code that says: delete all rows except those that have "F" as content in Column J. I already tried something like:
Range("1:65536").Select For Each cl In Range("J:J") If cl.Text = "A" Or cl.Text = "B" Or cl.Text = "C" Or cl.Text = "D" Or cl.Text = "E" Then Rows(cl.Row).Delete End If Next
but it also takes much to long. The major problem I think, is that the number of records is variable so I search the entire worksheet...
I am wondering how I can highlight rows that contain the same text across selected columns (not all). For example, consider the following table:
ID#6527 Jay yellow dog
[Code]...
I want to focus on Columns B, C, and D. I would like rows 3 and 5 to be highlighted, since they share the same text across the target columns. I assume this can be done via a formula in Conditional Formatting, but I'm not sure.
I have a spreadsheet with month names in column A10 and down and want to highlight the row based off a cell(which will be A3) so if cell A3 = Nov it would highlight all rows that have Nov in column A. I don't want to highlight the entire row just columns A.
I need VBA help. I know how to highlight every other row but what I can't do is highlight a row if column values are the same. For example I have 5 columns but only the first one has the data I'm interested in. If the data in the first column looks something like this:
1 2 3 4 4 5 5 5 6 6 6 7 . .
I want to highlight every other row that has similar values therefore I want to highlight row 2, both row 4s, and three 6s...etc.
I also want it to start on the 2nd row of every page until the last row of every page which is row 37 in my case.
I've got a large Excel table that's full of names and e-mail addresses - it's a report of e-mails that merges some data from two systems we use; a registration form and a database. We want to clean up the data so it only lists folks who 'registered' (it's not always BOTH people listed - sometimes it's only one!) - and the best way to do that is to take the information from a specific column in each row, see if it exists elsewhere in the row and clear the information that doesn't match.
For example: -A----------------B------------------C--------------------D--------------E------------------F-------------------G- John ---------- Smith -------- js@email.com -------- Jane -------- Smith --------- js@email.com ------ John Richard ------ McGee ---------j@email.com-----------Jim----------Samename ----jsn@email.com-------Rich Mary-----------Ladyface ------ms@email.com--------Steve -------Smith ----------ss@email.com-------Steve
Ideally, for each row I'd like to search A and D for the string from column G. If it finds it, the cell and the two cells to the right are fine - but everything else is 'cleared' (not deleted).
So the above table would look like: -A----------------B------------------C--------------------D--------------E------------------F-------------------G- John ---------- Smith -------- js@email.com --------------------------------------------------------------- John Richard ------ McGee ---------j@email.com-----------------------------------------------------------------Rich -------------------------- -------------------------------Steve -------Smith ----------ss@email.com-------Steve
I am trying to write a procedure to highlight entire rows in VBA based on a entry in column A.
I have the below which works for say 1000 rows but breaksdown when I have 58,000 rows which is the usual amount of data I will have.
Below is the code I have so far. It appears when I debug it breaks on the red line with type mismatch.
Option Explicit Sub RemoveBH() Application.ScreenUpdating = False Dim intcount As Long For intcount = Cells(1, 1).CurrentRegion.Rows.Count To 1 Step -1
I have a large file of invoices, and some have been paid. The problem is, sometimes it is not paid against the correct invoice, so I have a lot of credit and debit that should offset each other. I want to go through the sheet and highlight all the rows that has a matching ID and an a 0 value when total amount column was added up to another row. I would like it so that it highlights a different color for every pair of offsetting amount, but the same color highlight is fine too.
I want to create 3 command buttons (active X) on a worksheet to toggle between showing rows which only contain the below text in column L (range L9:L30) and showing all rows containg the options (However, I also have some blank rows in this range and i always want them to remain hidden.)
My text options are:
High ‚ Medium ’†“™ Low ’á
The text arrives in the cells via a VLOOKUP
Is the chinese text a problem? i can't type it into VB.
I've been using the following macro to hide and unhide rows with a command button in the same sheet:
Private Sub CommandButton1_Click() Toggle_Hide_Unhide End Sub
Sub Toggle_Hide_Unhide() Dim rngCell As Range Dim TakeAction As Boolean
If ActiveSheet.CommandButton1.Caption = "Hide" Then TakeAction = True ActiveSheet.CommandButton1.Caption = "UnHide" Else TakeAction = False ActiveSheet.CommandButton1.Caption = "Hide" End If
For Each rngCell In ActiveSheet.Range("I9:I30") With rngCell If .Value = 2 Then .EntireRow.Hidden = TakeAction End With Next rngCell End Sub
I want to highlight an entire row of data if the text in column A begins with "ABC". I can't seem to get the conditional formatting formula correct. My data goes from column A to column O.
I have a worksheet with 20+ columns. For this macro, I only need to focus on 4 of them. However, none of these columns are ever in a fixed position so the macro would need to find them by name and NOT by column position. Here they are...
1. Vacation Type (will only have a text value of either "Cold" or "Warm")
2. Vacation Started (will always have a date *x/xx/xxxx)
3. Vacation Ended (sometimes it will have a date '*x/xx/xxxx' and sometimes it will NOT have a date and will be truly blank)
4. Number of Days (currently has ALL truly blank cells)
THIS WHOLE MACRO SHOULD NOT BE CASE SENSITIVE ANYWHERE
Here's what I would like the macro to do...
Scenario 1 - for "Cold" values Find "Cold" text values in the "Vacation Type" column "Cold" values WITH a date in the "Vacation Ended" columnIF there IS a date in the "Vacation Ended" column in the same row, put the number of days difference between the "Vacation Started" column and "Vacation Ended" column in the "Number of Days" column.
The amount of days in the "Number of Days" column will determine whether these cells should be highlighted GREY or RED.
A) IF the number of days difference is 7 days or less, highlight the cells in the "Vacation Ended" column and "Number of Days" column RED. OR..............................
So I have a column that will have the same text in all of the cells contained within it except for one cell. Is there a formula that I can use that will automatically find and transpose the text of the one cell that is unique out of the column? I was thinking of an IF function, but the column could be up to 60 cells in length.
I have a .txt file (comma separated) that updates daily, which I need to import into Excel. The .txt file contains data from many years, but I only need the data from 2012. Is there a way to only import rows where the data in column "yearID" equals 2012? Since this is a daily operation, I'd rather not import all the rows and then sort/delete rows every time.
I need to move a number of rows, based on user input in front of the first column, continuously until it 'flattens out' into one row.. And then do the procedure again for the next row Kinda hard to explain.. maybe i'll use an example using this matrix :
I am trying to develop a macro that does the folllowing
1) Takes the value from a specified column of a sheet in the workbook and sequentually go the the values of that column and compares those values to another sheet in the workbook
For ex: sheet1 in column A row 1 has string value abc123 and sheet2 column A row 1 has value 123abc. I want to compare these two values from different sheets.
2) However if the values don't match I would like to take the value from sheet1 and see if it is in the list on sheet2.
3) If the value from sheet2 isn't on the list from sheet1 then paste that row information to sheet3
So far this is what I have. All it does now is go through both lists and compares the values but I am not sure how to single out those values for conditional formating. I am sure that the singled out values will need to be derived dynamically since I won't know what or when the values will be up for conditional formatting.
Dim LoopCount As Integer Dim RangeCount As Integer Dim CellVal As String Dim CellIncrement As Integer Dim ErrorCount As Integer Dim PasteConfirm As Boolean