Excel Condional Formatting Issue - excel

I have a simple formula that outputs as TRUE when I put it in a cell but when I put the exact same formula in a conditional format the highlight does not show up. There are no other rules being applied to this cell.
=OR(AND(OR(LEFT(I56,1)="U", RIGHT(I56,1)="U"), H$5="Total",H56>$F56),
AND(OR(LEFT(I56,1)="U", RIGHT(I56,1)="U"), H$5="OC-Normalized",H56>$D56))
I71 = "U" (TRUE),
H5 = "Total" (TRUE),
H71 = 90,
F71 = 30,
So H71 > F71 (TRUE)
I have about 170 rows and columns A thru AFG. The conditional is only being applied to the first column of data (column H) currently.
I cant figure out how to get the excel table posted here and I don't want to spend half an hour trying. Unless it really helps. The big question for me is WHY would this formula return TRUE in a cell and not in conditional format on the cell?
Returns TRUE but conditional formatting doesn't get applied to the cell. I have tested each individual part of the formula and they all of one of the OR sections returns TRUE.

Blach! I figured it out. I wish the 10 "how to guides" I read mentioned that you have to use the first cells address in your range when applying formatting. Otherwise it gets wonky. Once I did that it all seems to work

Related

Excel 2 sheets looking at date, AND the cell next to it, and give a color to a cell

I need to implant an AND function, so when I look at some dates on "Year sheet" then I need to look at the cell next to it, and if that cell has the text "bit", then it colors the cell on sheet1
=IFERROR(MATCH(DATE(YEAR(Year!$B$2),1,-2)-WEEKDAY(DATE(YEAR(Year!$B$2),1,3))+AG5*7,Year!$B$6:$B$40,0),"")
AG5 = the weeknumber 31 and is an integer.
Can someone guide me, where to add the AND() function.
Year sheet
As Foxfire And Burns And Burns explained in his comment. One solution would be a conditional formatting.
The AND Function works with conditions and returns only TRUE or FALSE, which is what you use in conditional formatting.
Go to Conditional Formating => Create a new Rule => Use a formula to determine which cells to format.
In your example if the formula you posted only returns the row of a Cell and you want to check if the cell next to it has a "bit" inside you can type something in the form:
=AND(A1=yourdate,INDIRECT("C" & MATCH(DATE(YEAR(Year!$B$2),1,-2)-WEEKDAY(DATE(YEAR(Year!$B$2),1,3))+AG5*7,Year!$B$6:$B$40,0),0)="bit")
And replace "A1=yourdate" by your first condition
More Generally on the And and conditional formatting
If I put as a new rule for the whole worksheet:
=AND(A1="";B1=6)
I obtain the following color every time my two conditions are filled
I hope it helped a bit.

How do you add a rule to cells in excel?

I have a set of data extracted from Hyperion Essbase in which I would like to add a rule over those cells. I've tried conditional formatting, but I'm not getting what I want.
For example some cells contain 0.000 or 13.5232 and the rule I want over them is IF(ROUND(ABS(Cell Value),2)<=0.01,0,Cell Value)
I'm not sure if my formula is the one that doesn't make sense or I'm not using conditional formatting correctly. I don't need any cells highlighted, I would just like the data in the cells rounded if they fit the criteria in my formula.
From your question, it seems like you want to use conditional formatting to change how the numbers are formatted (for numbers whose absolute value, rounded to 2 decimal places, is <= 0.01, they should be formatted with 0 decimal places, i.e., show as 0).
This can absolutely be achieved with conditional formatting (no VBA required).
Select the cells you wish to apply the conditional formatting to.
Open the Conditional Formatting Rules Manager, and create a .
Select Use a formula to determine which cells to format, enter the formula that identifies the cells you wish to format (make sure you eschew absolute references).
Click the Format button and select Number > 0 Decimal places ()
Click OK 3 times to return back to the spreadsheet, and you should see the values formatted as desired:
If you just want to change the displayed number format then this should do.
Sub cfrZeroes()
With Worksheets("sheet2").UsedRange.Cells
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, _
Formula1:="=ROUND(ABS(" & .Cells(1).Address(0, 0) & "),2)<=0.01"
.FormatConditions(.FormatConditions.Count).NumberFormat = "\0"
End With
End Sub
That will change -0.015 to 0.015 to look like 0 but it won't change the underlying raw value.

applying formatting for cell based on result(true or false) in EXCEL

I am trying to format cells based on values entered in cell. The cells represent multiplication sheet. After entering data B2 cell, if result is multiple of its row and column I.e 2 x 2 = 4 it should be green , otherwise it should be red . In short, I want to make this a multiplication trainer sheet. I tried using an if condition, but couldn't figure out how to put color for true and false.
The conditional formatting works fine when each cell of dest sheet dest sheet to test multiplication skills is referred whith source sheet from which tables can be learned referred with each cell of source sheet . When I tried to specify ranges in condition of formatting it throws an error and it says only map one cell instead of range. Its rather hard to map each and every cell to compare result . Please help me to format to differentiate true and false after entering value into cell.
you can download my file from here . http://s000.tinyupload.com/?file_id=00186543650788471896
Select the range you would like to format, enter conditional formatting:

In Excel, can you create a conditional statement that applies to every row in an excel sheet?

I'm not just trying to highlight a whole row based on one cell's value in that row, I'm trying to apply that conditional statement to every single row.
Do i need to go through the effort to create a conditional statement to all 100 rows? or can I create one that checks what row that value is in, then highlights that particular row accordingly.
I haven't tried VBA, I entered this equation using conditional statement
Just change 'Tests'!$3:$3 to 'Tests'!$3:$103 in "Apply To" section - it'll apply CF for rows 3:103.
In that case your formula =$C3 = "fail" would be adjusted for each row:
for row №3: =$C3 = "fail"
for row №4: =$C4 = "fail"
...
for row №103: =$C103 = "fail"

Conditional formatting of a column based off having any text in the first column of the same row

I'm not sure if this is even possible without going to VB, but I was trying to do it through conditional formatting. Basically I have a column (Column K) that will always be the same value (345) if there is a record entered in that row. Basically when I populate my reports I simply want the value (345) to be entered into Column K if there is any data in that row. I was trying to just use Column A as a reference. I was messing with =IF(ISTEXT(Col.A location),"345","") but that's getting nowhere. So, I'm looking for ideas outside of vba, but if there are no possibilities then vba is the way to go I suppose. :)
Assuming your data is in columns A to J, and that it starts in row 2, enter this in K2 and copy down as necessary:
=IF(COUNTA(A2:J2),345,"")
Edit: For a conditional formatting formula you don't need the "If" part, because the formatting is already ... conditional:
=COUNTA(A2:J2)
Will this work?
=IF(ISBLANK(A1),"","345")
This code works to tell whether column A has something in it or not COUNTA(INDIRECT("$A$"&ROW()))>0, but I don't think you can set the value of the cell using conditional formatting. But with conditional formatting you have to know ahead of time how far down your data is going to go unless you just put it in all the rows.
Why don't you just put it in your VBA code when you are copying, you can find out what the last row is then put the IF() formula in. You can use this code:
Dim r1 As Range
Set r1 = Range("K1")
r1.NumberFormat = "General"
r1 = "=IF(COUNTA(INDIRECT(""$A$""&ROW())>0,""345"","""")"
r1.AutoFill Destination:=Range(r1, r1.Offset(200))

Resources