I don't even know if this is possible but can you use some formula within Excel to return a value to a cell based on the cell formatting of another cell? Here is specifically what I am trying to do:
Cell A2 has a value of 10. If the font color of that cell is black (or "automatic") I want a formula in cell A1 that will return a value of "+10". If the font color of cell A2 is red, I want the formula in cell A1 to return a value of "-10".
I would like to have a single button that changes a range of cells from the USD to EURO to perhaps CAD symbol. Can this operation be performed, such that if I start in dollars, and I click the button once, it shifts by range to EURO (not formulas...just symbol)...and then if I click the same button again, it goes to CAD, and then back to USD with a third click?
Been racking brain, searching through the forum here, and my Excel 2003 Bible all day trying to figure out this problem to no avail. I would like to clear the contents of any cell in a given range if the cell immediately to the right of is formatted as bold.
I have a range of cells each containing a name. Based on a number that has to be entered manually I want excel to return the names concatenated in one cell. So for example:
Number of variable entered: 5
q9001 q9002 q9003 q9004 q9005 q9006 etc.
Should give me: "q9001 q9002 q9003 q9004 q9005"
I have been trying to work with formulas using IF and CONCAT functions. But so far I haven't figured out how to have excel return me the correct amount of variables for each separate number that can be entered seeing the number of variables entered can vary from 1 up to 50.
Macro Based on an input cell’s (e.g. B12) setting of “yes” or “no”, format several other cells (e.g. B20:G20, B23:F23, C26:J26) as follows: keep the existing yellow shading if input cell is “yes”, change to grey shading if input cell is “no”. I would like this macro to run automatically whenever the input cell value is changed.
Y3:Y500 contains a range of years, 2014/2015 through to 2018/2019, for a total of 5 different values (So conditional formatting is out the window). I'd like code which highlights the rest of the row, Z:FN, in a certain colour depending on the value in Y3:Y500.
Also, where there is data in the cells between Z:FN I'd like that to highlight in yet another contrasting colour.
I'm trying to use IF function with multiple statements in Excel 2003. However, whenever I try I get the "The formula you typed contains an error message".
I've tried even copying and pasting the example provided in the very Excel help file:
=IF(A2>89,"A",IF(A2>79,"B", IF(A2>69,"C",IF(A2>59,"D","F")))) (without changing any value or symbol) in a blank worksheet but even so I get the same error message.
I've also tried by copying and pasting examples I've found in different web pages, but the result is the same.
However, there's no problem with single statement.
I am stuck on this one. In the attachment I have values pulling into N3:N7 based on a drop down choice. Some of the numbers are numeric (no decimals), others are currency (no decimals), others are percentages (2 decimals), etc.
Is there a way to pull values I'm currently pulling into column N and have those values match the format of the source? I've tried converting it into TEXT but then I cannot place conditional formatting data bars on the values and have it work.
With the click of a toolbar button, I've got my vba inserting a new tab, renaming it, inserting headers and now working on the code to insert all the formulas needed in 12 columns to copy down as far as there is data.
The 4th column D is the hardest. Currently, I'm using manual "Conditional Formatting" to colorize the cells in Col D but need the VBA to place that "Conditional Formatting" code into the sheet so that when the sheet is created, it will hold the conditional formatting feature.
Specifically, the formulas I'm using in the Conditional format wizard are:
Formula: =$B2$D2 then turn the cell red Applies to: =$D$2:D
Copy down (in other words, the colorizing should work all the way down Column D as long as there is data in Col D.
I want to format the cells in column B under the context of the cells in the corresponding row of column A. For example I want to color the cells in column B that the context of the corresponding row of column A is 1:
Is there a macro that can copy the information of any italicize item in Sheet1 to Sheet2 and automatically italicize the item in Sheet3 if the same item exist?
In my attached example: In Sheet1, B3 to B8 contain information about a restaurant. I want the macro to copy any restaurant (and its information) that is italicize to Sheet2. And in Sheet3, any restaurant that is in italic in Sheet2 will become italicize in Sheet3 if the name is match. Is there such a macro that can do these things?
I'm afraid as its a multiple conditional format and thus needs coding. At the moment I'm using the following
Private Sub Worksheet_Change(ByVal Target As Range) ' Conditional Formatting for more than 3 conditions Dim rng As Range ' Target is a range::therefore,it can be more than one cell ' For example,,someone could delete the contents of a range, ' or someone could enter an array.. Set rng = Intersect(Target, Range("E27:E34,G27:G34,I27:I34,K27:K34,M27:M34,O27:O34,Q27:Q34,S27:S34,U27:U34,W27:W34,Y27:Y34,AA27:AA34"))
If rng Is Nothing Then Exit Sub Else.....................
This works very nicely, so that for example if I type the number 10 into cell M33, that cells fill colour becomes black (and the text turns white). Alas I would now also like to extend the fill and text colour to the cell one to the left too. To take this example I would type 10 into cell M33 and cells L33 and M33 would both be filled black and their text would be white. I'm not sure if this requires a change to the code, or if its possible to just have a formula or something which copies the fomatting of one cell into another
I have been working several weeks on producing a macro that can quickly eliminate blank lines in an .xls file which is created by exporting a Crystal Report into Excel. The macro can do that, but the big problem is that it freezes up the users PC for 3-5 minutes. If you go into Task Manager you can observe that CPU usage is at 100%. The .xls files that I am trying to run this macro against are around 50,000 rows long with data in about 10 columns. About 2/3 of those rows are blank. This is an inherent problem when exporting Crystal Reports into Excel. I went to Business Objects website (Crystal Reports) and their solution is simply not an option. They suggest removing If-Then-Else logic. I simply cannot do that because that is the heart of how the report selects data for each row to print in the report.
Below is the code that I wrote with documentation to explain how it works. If you would like to try it I attached an .xls file. It is only 800 rows long so that I could stay under the forum's requirement of attaching nothing larger than a 48.8 kb file. The file has only one column, 800 rows long. You may want to copy and paste it a few times to make it longer. When running the macro it will open a dialog box so that you can go wherever you copied the file, and open it up.
Sub OpenXLSFile_DeleteBlankLines() Dim fileToOpen As String Dim lRows As Long 'open dialog box for user to access an Excel file for deleting blank lines fileToOpen = Application. GetOpenFilename(FileFilter:="microsoft excel files (*.xls), *.xls", Title:="Select an .xls file to open for deleting blank lines...", MultiSelect:=False) If fileToOpen <> "" Then Application.Workbooks.Open fileToOpen End If.......................
I have a macro that's supposed to see if cell 5 meets criteria and continue to all sheets in workbook, except " Total".
When I activate the macro on a specific page, it runs smoothly on that page. But when it's finished, it doesn't continue to the next sheet in the workbook.
Sub ColourBG() Dim ws As Worksheet Dim line As Integer endline = Range("A1000").End(xlUp).Row
For Each ws In Worksheets If ws.Name <> "Total" Then With ws For line = 3 To endline Application. ScreenUpdating = False If (Cells(line, 5).Value = "0206") Then _ Cells(line, 1).EntireRow.Font.ColorIndex = 5 '*(Blue) Next line Application.ScreenUpdating = True End With End If Next ws End Sub
I need to evaluate some offers and for the management I need to follow some strict rules like:
1. € 1.000.000 instead of €1000000. But that's not the problem 2. to use maximum 3 digits... Example: 10,2 or 6.12
I tried with an if function and then round, but I think that's not right way. If number < 10, then round with 2 decimal places else, round with 1 decimal place
i have a column of data part number part text e.g 7w1,8b1 in the next column i want to write a function that will look at the other and dependant on whats in it place a word e.g. for 8b1 i need it to look at the "b" and enter beauvale if theres no "b" but a "w" enter wollaton, i have tried an if function and used "*b*" but it doesnt seem to like wildcards ....
This time I'm trying to use the max value and row value at the same time, but it won't let me. Here's what I'm trying to do...
A B C D 1 a b c d 2 7 9 4 2 3 e f g h 4 8 2 7 8 5 i j k l 6 4 3 3 9
I want Cell A7 to return the letter before the highest value in column A... A7=e B7=b C7=g D7=l
I tried to do something using two cells, but even then I couldn't figure it out. I thought a ROW(MAX(A1:A6)) would give me the row and I could go from there, but that didn't work.
im looking to return an answer in cell c28. in b28 it will say "best goalkeeper" in c28 i need a formula to look in range d2:d6 then return the highest answer and correspond that to whats in b2: b6. so we could say
I want to color code cells within my workbook based on certain criteria. The workbook spans 17 columns and about 400 rows. Each cell contains a team name or is blank. I can't seem to find a good method to find a cell and change the cell color and then move on to the next cell. I have attached a workbook with actual data that I am working with. I am attempting to use case statements but perhaps they are limited to only one column or I am just missing something. I have spent many days searching the forum and have found no solution. Any help would be greatly appreciated.
All I am trying to do is make it easier for Team Managers to find their field and time slots based on the cell colors. Below is the code that I have started:
VB: Sub TeamColorFilter() Dim myCell As Range 'Set MyPlage = Range("A3:Q390")
I'm trying to format a singe cell based on if a row of dates is aged more than 3 days.
Column C is for Load Date. Rows C2:C100 may or maynot have a date in them. Cell C101 is a count (=counta(C2:C100) of how many cells above contain data.
I'm wanting to format C101 to turn red if ANY of the dates in C2:C100 are older than 3 days from the current day.
How would I make cells in column A to C be highlighted yellow, of which is 0.02 in value be higher than in compared with the adjacent cell in column D ? It is easy to use condition format function to setup the conditions in 1 row. The problem is there are thousands rows in the sheet(of which represents an individual file by each row), and need to have the conditioning format applied on each row independently. How can it be done w/o the need to have format painter applied line by line, of which is a very time consuming.
What I am trying to do is create a multi-currency expense report. For example, cell B1 has a drop down list of three different currencies. Based on the currency selected in B1, I want C1 to reflect that number formatting using the proper currency.
Im sure there is an easy way to do this but I have tried using an if statement in the conditional formatting section but it does not work.
how to total the different currencies using the ifsum formula, so this is more of a presentation task, but still it has annoyed me to no end.
In the example workbook, the currency value selected in row E should effect the currency formatting in Rows F-L