I want a macro to find all the words written a column in another excel & make them bold.
For EX: I have Words like new, grow, etc written in a column B of Excel an the macro has to Find theses words individually in another excel & make them bold and change the Background of the cell to Red Color.
Thanks in Advance.
You may want to have a look into conditionnal formatting.
Assume for example you have the values you want to look for in column B, and you want to highlight all values in a range, say, D4:F15.
Select the range D4:F15, make a new formatting rule and choose "Use a formula to determine which cells to format". Enter =ISNUMBER(MATCH(D4;$B:$B)) as formula, and make the format as you wish. Note that D4 in the formula has to be the first cell of the range.
If you don't need more than that, the benefit is that you don't need a macro at all, and the formatting can be done in real time too.
Related
So I have these columns:
And what I would like to have each cell under the "Completed Date" column change color according to whether the date is before or after the due date or if it's blank. I'd like to do it in a way where I don't have to set the conditions for each cell individually but rather in a sort of "drag through" way, like when you use a formula, and you drag that formula down, it applies to each adjacent cell on the way down. Any assistance with this would be most appreciated. Thanks!!
As #cybernetic.nomad says, get it right for the top-left cell and the rest will follow. For example, if you want to highlight where the completion date is after the due date, put
=AND(ISODD(COLUMN()),B2>A2)
as a custom formula.
You will need separate rules to highlight blanks and completion dates equal to or before before the due date.
What happens if your range starts in column A, so there is no column before it? A strange quirk of conditional formatting is that it allows you to wrap it around to the very last column (XFD), so in this case your formula would look like this:
=AND(ISEVEN(COLUMN()),A2>XFD2)
I have created rather complex report with multiple formulas. To keep the report clean, I decided not to show formula results if a certain cell is blank.
QUESTION:
Is there any way to 'incorporate' that check to every single formula on the said worksheet OR do I always have to do a isblank check for every single formula I am writing?
Since about Excel for Mac 2011 you have the option of a workaround, which is to blend the formatting of cells containing a formula into their background, with conditional formatting. The usual approach is to turn cell content white, on a white background. With say A4 to be the cell that either is or is not blank a CF formula rule of something like:
=AND(ISBLANK($A$4),ISFORMULA(A1))
with white fill should work for a range starting in A1.
On the “Inventory” worksheet, apply formatting to the rows of data that bolds the text and changes to text color to RGB “0”, “176”, “80” if the number “Sold Last Month” is more than 90% of the number “In Stock”.
database-inventoryWorksheet
This is the formula you need.
=SoldLastMonth>(InStock*0.9)
It's tested to work with two named ranges "SoldLastMonth" and "InStock" because those are the names you provided. In your worksheet they might actually be cells. The actual formula you might use therefore might look more like the one below.
=$D2>($G2*.9)
To apply this formula to CF, select the entire range you wish to format, then enter the formula for the first row of the selected range (row 2 in my example).
After entering the formula you can select the format you want, for example Bold and coloured. You will be able to select the colour from the pallet. No need (and no chance) to specify RGB. For more information about conditional formatting please read up on the subject online. Such tuition isn't provided here.
I want to assign Color Values to Lines based on certain value comparisons. Attached pic for reference.
Excel Color Coding Explanation.
The example I have provided is where I have set the color coding manually. The coding on the spreadsheet is not exactly correct.
The Colors should depend on the Explanation I have provided.
Please let me know which formulas to apply in which cell and how so the Color Coding applies automatically.
Thanks in advance!!
It seems to be working on rows but not all. Ive highlighted the parts with the desired color to illustrate.
Try this in conditional formatting. Each should apply to the whole array of cells. Ensure that the first row of the row matches the row number used in the formulas. The key here is the row number lineup and the $ to lock the reference to the column but for the whole row.
You also need to highlight the whole array to which you want it to apply before putting in the formulas. If you change it after you put in the formulas the cell references may change and you will need to paste them in again.
==OR($M4<>"",$M4<>0) with green fill
=AND($I4<0,OR($M3="",$M3=0)) with red fill
=AND($I4<$L4,$M4="") with orange fill
=AND($L4>$L4,OR($M4=0,$M4="")) with no fill (you do need to go in and select no fill
I've been searching around here but I can't find anything quite like what I'm after.
In excel I have one column with a drop down list of a dozen different initials, with conditional formatting on those cells. I would also like to format another column based on those initials, but don't want to set up a dozen rules on each cell, one by one. If I set up the top cell with the correct rules I cannot fill the formatting in because the formula is not updated on a row by row basis, but en bloc for the range.
I have no real experience with VBA or macro's, is there a way to do this more elegantly than brute force?
Thank you very much in advance. This forum has always been a great help, hopefully you can help this, too!
I hope I'm not misunderstanding your question. You can copy the formatting to the other columns if you have set up the format as a formula. For example, if A is your column with initials, and you have a data cell in B2, then you can set a formula in B2 as A2="ER", for example, with the formatting you want, and do the same for the rest of your matches on A2. Then, you can copy the format down column B (unfiltered) using Paste Special Format. You can copy the conditional formats across as long as you make sure that your format in the conditional formatting rule is anchored on column A (i.e., $A2="ER").