Find Specific Phrase In A Column And Change The Row Color And Its Border

Mar 27, 2014

I have the table, as shown on left in the appended image, and the final result should be the right one.

The steps are written as 1, 2, 3 and 4.

Untitled.png

View 13 Replies


ADVERTISEMENT

Change Line Border Color Of Shape

Sep 21, 2007

I have this simple code which sets the objects format as default.

Private Sub FormatTextBox()
ActiveSheet.Shapes("FormatBox").Select
Selection.ShapeRange.SetShapesDefaultProperties
End Sub

Is there a way to set an objects shape to the default format...not as default?

ie: if the default line color is blue. what code could i use to set an object with a black line color, to the default blue?

View 3 Replies View Related

Change Textbox Border Color - Visible Or Hidden

Mar 8, 2012

What command I would use to change the text box border color, and set text border to visible or hidden?

View 3 Replies View Related

Change Columns Fill Or Border Color Based On Current Date

Aug 21, 2014

I have a simple spreadsheet. A column for a persons name and 31 columns, one for each day of the month. I want to apply conditional formatting, either fill color or border color, to the date column of the current date when the spreadsheet is opened.

View 2 Replies View Related

If Cell In Specific Column Contains Value Then Bold And Change Font Color For Entire Row

Mar 27, 2013

I'm trying to have a macro run to search a specific column (S) for a particular text value "y" and if true it will change the font to bold and the color to red for the entire row of the cell that contains the "y". the column is part of a data table that is constantly refreshed not sure if that makes a difference or not.

View 2 Replies View Related

Find Multiple Numbers In One Column And Replace With Single Phrase In Another Column

Jan 31, 2013

I have taken over this spreadsheet for my work, and it is basically a statement in excel. What I want to do is find a list of invoice numbers in column B populated from a remittance, and then replace column F to say a specific thing depending on check number and date paying for that invoice. So if a check printed today I would have it replace column f to say paid 1/31/13 check # xxxxx. Currently I am searching for each invoice indivudually and then replacing with check number and date. There are about 200 invoices per month that I deal with, and it is a big waste of time!

For example from this

invoice #1 / reconciled (DATE)
invoice #2 / reconciled (DATE)

To this:

invoice #1 / paid (DATE) check # (xxxxx)
invoice #2 / paid (DATE) check # (xxxxx)

View 2 Replies View Related

Find Phrase In One Column And Apply Formula To Different Columns Same Row?

Aug 27, 2013

I am trying to come up with a macro that will find rows that contain the words �as % of Revenue� and then calculate and apply the appropriate formula to the actual and budget columns. I have attached a sample of what the source data look like.

The formula divides the category�s total expense by the revenue in row 4. For a complete macro, I would want to also subtract the budget result from the actual result and put its result in the �better (worse)� column. I need to use this on 12 or so different workbooks which is why I�m wanting a macro.

Here is my attempt to accomplish this task; however, I quickly realized it is woefully inadequate because I neither understand how to apply it to the different columns or how to find the next instance of �as % of revenue�).

VB:
Sub Macro1()
'
' Macro1 Macro
'
Range("B10").Select
Cells.Find(What:="as % of Revenue").Activate
Range("B20").Select
ActiveCell.FormulaR1C1 = "=R[-1]C/R10C"
Range("B21").Select
End Sub

View 8 Replies View Related

Find Unique Value And Paste With Content From Column With Border

Aug 17, 2009

My goal is following:

I do an inventory of my schools equipment and have much info in many columns. But I just want to concentrate on column A.

This is example of the room names at my school and look like this:

Column A
A01
A01
A02
A02
....

View 10 Replies View Related

Add A Textbox At The Current Position (selected Cell) With A Set Size, Fill Color, And Border Color

Nov 2, 2008

I'm trying to add a textbox at the current position (selected cell) with a set size, fill color, and border color. I found this: http://msdn.microsoft.com/en-us/libr...8(VS.80).aspx:

View 2 Replies View Related

Change Color In Specific Columns

Jun 12, 2008

I have a macro that changes the color on a row, but depending on which cell I am in different columns arwe changing color. What I want is that if I make a change in row 1 want the color in A1:L1 to change and if i change row 2 i want A2:L2 to change, so alwaws the columns A to L in respective row. My macro

Sub Markera_Ny()
Dim intRadnr As Integer
Dim intStartrad As Integer
Dim intSlutrad As Integer
Dim Box As Integer
Dim Rad As Integer
intRadnr = ActiveCell.Row
intStartrad = ActiveSheet.Range("First").Row
intSlutrad = ActiveSheet.Range("Last").Row
If intRadnr < intStartrad Or intRadnr >= intSlutrad Then
MsgBox "Macro can only be executed in rows 21 to 1000"
Exit Sub
End If....................

View 5 Replies View Related

Conditional Formatting - Cell To Change Color When Apply Specific Value

Dec 4, 2012

I know how to set a conditional for a cell to change a color when i apply a specific value, but how about if i want to set E2 cell to change to green when i place a 'X' on F2?

Pretty much I want 2 columns that say Yes and the Other No. When i place a X on Yes that other cell turns green, if i place a X on No that other cell turns red.

View 5 Replies View Related

Macro Button To Change Background Color Of Specific Cell

Sep 17, 2008

My boss wants a spreadsheet that has multiple buttons on it that will change the background color of a specific cell to four different colors. Example:

Text written in Cell B3, Button in Cell A3 that will change the Background color of Cell B3 to either Green, Yellow, Red or Blue.

There will be a lot of buttons on this worksheet following the same format as above. I don't want to change the value of what is in the cell, just the background color.

View 7 Replies View Related

Find Cell With Specific Fill Color

May 12, 2006

I trying to look for a all the cells with the same fill color in the same column and assign a specific text to the cell for example

Column A - Cells with fill Yellow must have for text the word Sub- Total
Column A - Cells with fill Black must have for text the word Grand Total

View 4 Replies View Related

Find Phrase And Look Up Corresponding Cell Value

Mar 24, 2009

I have three columns.
Column 1: A list of items with a very long text description in each cell
Column 2: The Key phrase found within the long description in the cells of Column 1.
(The key phrase is different for each cell).
Column 3: Custom shortened description in text format.
Column 4: Formula to return the Custom shortened description, equivalent to the item in Column 1

How do I create a formula in Column 4 so that Excel searches for the Key phrase found within the string of Column 1 and returns the custom description in Column 4?

View 9 Replies View Related

VBA Code For Find And Replace A Particular Phrase

Apr 23, 2008

I am trying to write a code for VBA code for find and replace, I want to find a particular phrase (i.e. 1. Value Added Processing) which is all in one cell and replace it a range of cells of other cells which is contained on a different sheet.

So basically the original 1 cell would be replaced for anywhere between 1 to 20cells. Depending upon what I type in.

Worksheets(1).Range("B2:B50").Replace What:="1.ValueAddedProcessing", Replacement:= _
"Sheet1!A1:A11", LookAt:=xlPart, SearchOrder:=xlByRows, _
MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False

View 9 Replies View Related

Keyword Search - Macros To Change Font Color For Specific Keywords (not Entire Cell)

May 5, 2014

I need to conduct keyword searches in excel and color the keywords a different color without changing the font color of the entire cell. now, i found some code from another thread that does this, but i cant seem to get it to work with more than 2 keywords. i need fine-tuning the provided code to do what i need it to do.

[URL]

the VBA code i used was this:

[Code].....

I was playing around with the example, the Cat_Mouse.xlsm, and when i modified the 'myList' and 'myColor' arrays, it does not work.

Cat_Mouse.xlsm

For example, I modified the code to add the word bat:

[Code] .....

When i run the macros, the word "Bat" does not become colored red. interestingly enough, when i substitute the word "bat" for the word "hat" in the "myLIST array, the word "hat" does change to the red font.

I am looking to use this code to address keywords in my excel file by coloring all key words red and i have more than 10 key words.

View 9 Replies View Related

Add Row If Value Value In Column Change And Paste Specific Value Depending On The Change

Mar 5, 2010

I have used the below code to insert a new row when the value in coulmn A change. I now need to evolve it so that the new row will contain a specific value depending on the changing value:

Before:
Column A Column B
one test
one test
two test
two test
three test
three test

After:

Column A Column B
one test
one test
Coz two............................

View 9 Replies View Related

VB Border Color Code

Nov 6, 2007

part of my code looks like this. Instead of it being if c.interior.colorindex i want it to be if top border color = 4.

How do i syntax this?

For Each c In Worksheets("Sheet1").Range("B7:DE7").Cells
If c.Interior.ColorIndex = 4 Then Range("DH7").Value = Range("DH7").Value + c.Value
Also, is there a way to specify Range("DH") and make the row be the current row, not hard coded to 7

View 9 Replies View Related

Format Border Color Based On Value

Nov 1, 2007

I found this code (compliments of Andy Pope) which fills a background color based on its corresponding cell value. (then offsets all uniformly)

View 9 Replies View Related

Default Border Color Index

Jun 18, 2009

When I launch excel 2007, i have cells with a grey border. I'm not sure what the colorindex is of this border.

Through a macro, when I format cells, I use

Cells(x,y).BorderAround ColorIndex:=xlAutomatic

xlAutomatic points to BLACK by default. Could someone tell me how I could reference the actual default colorindex (the grey one which seems to border all other cells, while not being xlAutomatic)?

View 2 Replies View Related

Background Color And Border Around Macro

Aug 6, 2008

I am trying to develop an Excel spread- sheet by using some macros. In detail, in my first worksheet, I have something like -

Exp1 ....
Exp2 ....
Exp3 ....
:
:
:
Expn ....

This rows are coming from another worksheet and I have used a macro (developed by me) to populate these rows. Even the number of rows to be populated is not fixed.
However, I would like to add one row with text - " Total Expense" after those rows. This row will have some background color - say Tan - and font color - say Green - and also a border around its own - in nature, the border will be thick, Double and with color Rose. I have tried the following code in macro but not working properly -

Sub Include_Fields_n_Format(loc As String)
tot_exp_scell = loc & f_scell
tot_exp_ecell = loc & (f_scell + 1)
Range(tot_exp_scell, tot_exp_ecell). Merge
Range(tot_exp_scell, tot_exp_ecell).WrapText = True

Range(tot_exp_scell, tot_exp_ecell).Interior.Color = RGB(150, 150, 150)
With Range(tot_exp_scell, tot_exp_ecell).Font...................

View 4 Replies View Related

Border Color Issue In Excel 2003

Jan 6, 2009

I am trying to assign a border and fill to cells, of identical colors, using VBA. Simple enough, yes? I am using the same RGB value for both the fill and the border, but in Excel 2003, they are assigned two different colors: the fill is the correct shade, but the border is not, which makes absolutely no sense to me. I could understand if both colors were slightly off from the shade I'm getting in 2007, but to have one be correct and the other not? I can manually assign the border to be the proper color, but this doesn't help.

The code is:

View 14 Replies View Related

Color Row If Cell In Column Contains Specific Word

Apr 17, 2008

I've been trying to come up with a conditional that will format a row if a cell contains any instance of a given word.

I know the following will format rows containing the EXACT entry of "apple" in column E:
=$E1="apple"

But I'd like a conditional that will find entries like "apple pie" and "crabapple" as well. I'm sure it's a simple solution, using a SEARCH function or something...but I can't figure it out.

View 3 Replies View Related

Color Row Where Cells In Column Contains Specific Word

May 26, 2008

I have a spreadsheet with 12 coloums. In the last coloum are the ords "yes", "no", or is empty (null?). I need to find a way to have each row that contains the word "no" or is empty to be highlighted in red font and bold type. When the word "yes" is typed then the font is black and the type in normal. This allows me to see at a glance what orders have not been picked up or have problems.

View 2 Replies View Related

Rank Instances Of Phrase In A Column

Mar 21, 2014

Let's say this is my data. It's already been sorted so that like entries are all grouped together.

Ex1
Ex1
Ex1
Ex2
Ex2

I need to make a macro that numbers my data like below.

1
Ex1

2
Ex1

3
Ex1

1
Ex2

2
Ex2

Essentially, my data is many columns and sorted on a bunch of different levels. I need a quick way to assign a rank to every row in the same group, to see at a glance which performed the best.

View 3 Replies View Related

Xl 07 Can't Change Border Colour

Jan 16, 2009

I am using Excel 2007. One of my worksheets has a dark border around some cells. Instead of being blue the lines are black. I used the right click and format cells option but it does not work.

View 10 Replies View Related

How To Change Type Of Border

Apr 24, 2014

How can I modify this code:

HTML Code: 

Sub aaanewa()
Dim lRow As Long, c As Range
lRow = Cells(Rows.Count, "D").End(xlUp).Row
For Each c In Range("D1:D" & lRow)
If c.Value > "" Then

[Code]...

To include this:

HTML Code: 

With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ThemeColor = 1
.TintAndShade = -0.14996795556505
.Weight = xlThin
End With

so i can change the color and size of border

View 2 Replies View Related

Change Color Of Cells Within Column If Date Is Present?

Apr 19, 2013

I have cells within a column that could contain both text and dates. When a date is entered - the activity is complete. I want the cell color to automatically turn green when a date is entered. Conditional formatting seems to use ranges, or today's date, or > than and < than... and I want the cell the turn green when any date is entered. I haven't been able to find either vba code or an excel formula that will work.

View 3 Replies View Related

Change Color Of Entire Row Based On Value Of Single Column

Aug 4, 2006

I am looking to change to color of an entire row based on the value of a single column in that row....Say I have an issue on a line and the "priority column is set to high" I would like that entire row to turn red....

View 9 Replies View Related

To Change The Color Of An Entire Row Based On The Value Of A Single Column

Aug 4, 2006

I am looking to change to color of an entire row based on the value of a single collumn in that row....Say I have an issue on a line and the "priority collumn is set to high" I would like that entire row to turn red....

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved