Is there a way in MS Excel 2007 where I can hide a row in excel that contains a specific value? For example if cell B1 contains number 6, the entire 1st row will be hidden.
NOT with formula.
Formulae don't do that sort of thing. With formulae about the closest to your desired result might be to apply conditional formatting to 'hide' the contents of the entire 1st row - by blending their font colour into that of the text background, or 'redact' - if say black font then applying black fill.
Try VBA.
Related
I'm trying to randomly highlight (change the cell colour) of four cells in the first Excel column. It is important the selections highlighted are only cells containing data as the size of the data set will vary.
The highlighted selections needs to be un-highlighted when the macro is run again to generate four new selections.
I have tried to brute force this with functions (RAND-RANK-XLOOKUP), but the outcome is messy and doesn't react to different sizes of data.
Highlighting the cells in a color is the goal, conditional formatting could be suitable.
Four random cells from the first column of the Excel sheet is the target (cells only containing data).
Using Conditional Formatting
Let's say you have data in column A. For example 16 rows like this:
You could use the COUNT() function to calculate the number of cells with content in column A in cell D1 :
=COUNT(A:A)
And then you could calculate the position of the cells you want to highlight with
=RANDBETWEEN(1,$D$1)
Then you can create a helper column to check if a cell should be highlighted.
Formula in G2 : =IFERROR(MATCH(CELL("row",A2)-1,$D$2:$D$5,0)>0,FALSE)
The idea behind this function is simply to check if the row of the data point corresponds with one of the random positions we have.
Finally, you would use a formula to define your conditional formatting by applying it to Column A and using =$G2 as the formula.
Note that:
The highlighing will reset everytime you change a cell provided that you have "Automatic calculations" turned ON.
There is a possibility that 2 or more of the random positions are the same, so you'll need to recalculate if that's an issue.
I'm developing an aircraft tracking log.
Is there a formula or conditional format or VBA that could gray out the FONT (change all font to black) of an entire row once the ATA is entered in a cell?
I looked all over the internet and can't find anything I am looking to accomplish.
I attached a snapshot of the spreadsheet.
Aircraft log
Simply try-
=$G2<>""
And apply to =$2:$500 If you want to apply to only few cells of row then try apply to =$A$2:$F$500 but formatting formula is same =$G2<>""
Imagine a sheet where column A is names and the other columns contain relevant information for those names. I want to conditionally format the cells in column A so that if there is a blank cell in that row that should be filled, the name cell will display the conditional formatting; think of it like a "there's missing info for this person" indicator.
Before this gets brought up: while it's trivial to set up conditional formatting to color empty cells, coloring the blank cell itself has proven to be not sufficiently noticeable due to the width of the spreadsheet.
It's exactly as #mehdi said. You need to use COUNTBLANK(range).
For conditional format, use the option "Format Cells where this formula is true". My formula in cell A2 is like this:
=IF(COUNTBLANK(2:2)>0;TRUE;FALSE)
After typing it, just change the range where this rule applies and select your range data.
I did it like you can see in the image below (please, note I got spanish version of Excel). In my case, if ANY cell in the row is blank, then it colours with yellow the cell.
thanks in advance for the help.
I'm making a Gantt chart in Excel and am trying to integrate the capability to highlight the work week (WW). The idea is that one can select the WW from a drop down menu and the corresponding columns in the chart are highlighted. I am struggling with the conditional formatting formula to highlight the desired dates.
Here's a screen shot of how the chart is set up
I am able to highlight the column of the cell containing the WW value (e.g. in picture column I is highlighted as it contains "WW42" in cell I3. I would like to be able to highlight the days from Sunday to Saturday of each WW.
Most formulas (that I know) work on the value of the cells rather than their location or index. I have tried simply filling in all the blank cells with the WW value and then hiding the value, but the formatting isn't aesthetically pleasing and it's not efficient.
I have also tried merging the WW cells, but am unable to select all columns of the length of the merged cell, just the first column associated. For example, if I merged I3 to O3, conditional formatting will highlight that merged cell and only column I.
Any suggestions on how to approach this is greatly appreciated!
Attached is a screenshot of my structure with my conditional formating working as required. You'll need to adjust acording to your structure, but I used a formula-based conditional formating, with the rule:
=COUNTA($B$2:B$2)=$A$1 //Where A1 contains the workweek I want to highlight
Entered into cells $B$3:$V$6. Of course, in your case you'd have to change it to something like:
=COUNTA($B$2:B$2)+41-3=$A$1
Since your work weeks start at 42 and you have 3 extra headings you dont want added on your sum (ACTUAL START, ACTUAL DURATION and PERCENT COMPLETE). Also the header for the work week has to be a numeric value, but you can play around this to get what you need. Let me know if you'd need further help.
You do not need to use the third row for your conditional formatting, if row 4 has legal excel dates. The WEEKNUM() formula gives you exactly what you need.
If your Dropdown Menu is in cell B2 and consists of numbers from 1-52 then this should work for your conditional formatting:
=$B$2=WEEKNUM(D$1)
See attached photo.
I am working in Excel 2011 for Mac. I have a cell in my spreadsheet with wrapped text, and whenever I add to the text of that cell, the row height automatically readjusts based on the number of rows in the text of the cell. However, when I reference that cell in another cell, the height of my second cell doesn't readjust as I change the text in the original cell. I know that I can manually do this by selecting the cell and AutoFitting it, but I'd like the row height to adjust automatically. Is there a way I can do this? I've attached a photo below to illustrate my problem. As you can see, the A1 is my original cell, which has wrapped text and automatically adjust the row height. I then referenced cell A1 in cell A4 and then wrapped text in cell A4, which, as I had hoped for, AutoFit the wrapped text from A1 into A4. However, when I added text to A1, the height of A4 didn't change, as you can see as the bottom 3 lines are cut off.
Thanks for the help!
AFAIK, you'll always need manual intervention (or VBA) to autofit the row when the content is created with a formula. It's the same in Excel for Windows, so I'm not surprised to see that behaviour in Excel for Mac.