Format another cell based on this cell value - excel

Is it possible based on current cell value, format another cell? Maybe I am overcomplicating things, but what I need to achieve is to display a message in a cell if the file is in Protected Mode. Once a user clicks "Enable Editing" this message should disappear. So what I thought of doing is have a cell set to the message. Then have another cell change this is cell if some calculation is correct. Since it won't be able to calculate until Editing is enabled, the message will display. And once a user Enables Editing, the message will be gone. Is there a direct way to do this or a workaround that will do the trick.
Thank you.

have you tried using an IF formula?
=IF(cell=correct,"","Displayed Message")
You can replace the cell=correct with your condition check that you mentioned in your post.
Leave the next set of quotes blank (so if that condition is met no message will appear)
Change the contents of "Displayed Message" to whatever you want to display if your condition is not correct ie. your sheet is in protected mode.

I found a solution. Still using conditional formatting. I set the value of another cell to a formula (=2+2) and then in my cell check if the value is 4 then change format. Guess could do the same with the IF. Just needed to think from a different angle.

Related

How can I work with excel date after exporting a file from a site

I've exported an excel file that have some column whit date in it.
when I want to work whit that column's cells(for example different between two date) excel shows me an error. but when I double click on a cell, it work properly.
you can see below that first two cells have correct value after I double clicked on them. But next three cells still don't work properly.
I will be thankful if anyone helps me.
Cells example
Based on Harun24HR's comment, you could think of a macro to deal with the situation (if the situation repeats itself over and over -> would something like this be working?
Worksheets("Sheet1").Activate Application.DoubleClick)
or manually add a neighbour column with formula in the cell such as =DATEVALUE(ThatNeighbourCell)
Also the formatting style of the cell might be relevant.
macro is such as this:
Sub doubleClickIt()
Worksheets("Sheet1").Select 'adapt name
Range("A1:A400").Activate
Application.doubleClick
End Sub
But I'm not sure it will do the trick, double clicking as a user seems to trigger different results than double clicking from the macro..
Please have a look at this question which seems very relevant to your issue, if you intend to go for a macro.

Prevent Blank Cells with Data Validation

I'm having a seriously hard time with the simplest of Excel data validations: how do you prevent a blank value? The user needs to enter a number into a cell. If the cell has no value, Excel should throw up an error message. I've tried the following:
=COUNTIF($A5:$A27, "")=0
=ISBLANK($A5)
=ISBLANK($A5)=FALSE
and a whole assortment of ridiculous Excel gymnastics, but nothing has worked. The Ignore Blank checkbox is off, too. How hard can this be?
This is in Excel 2016 running on Windows 10. I've tried Google searches ad nauseum with different search keywords. I've tried winging it. I've tried searching on here fora simple formula to solve the problem.
Assuming you also don't want to allow a value of 0 to be entered, you can use the following validation. However, validation only applies when you're entering values into a cell. If you're in edit mode, you won't be able to hit Enter while the cell is blank. But there's nothing to stop you from ignoring the cell entirely or even selecting the cell and clearing it's contents using the Delete key.
There's no way for Excel to force fields to be mandatory and with good reason. If Excel wasn't going to let you do anything while a mandatory cell was empty, you would be stuck if there were two mandatory cells because you could never complete one cell without Excel complaining about the other cell.
You can only force cells to be mandatory when you're also running macros which could display error messages instead of performing the required tasks if the mandatory fields aren't all complete.
As per the comment, the best thing to do is highlight empty mandatory cells using conditional formatting. From the Home tab, create conditional formatting based on value equal to 0 then set the background format to red (or whatever you want).

Excel makes cell value clickable whenever HYPERLINK() is used in a formula

I'm attempting to use an IF() function to conditionally make a cell a hyperlink.
=IF(LEFT(A1,4)="http",HYPERLINK(A1,"Link"),IF(A1="","",A1))
If the cell starts with HTTP, it will become a hyperlink.
If the cell contains nothing ("") it will show nothing.
If the cell contains another value, it will show that value.
Currently, no matter which scenario above is true, the resulting value displayed in the cell is clickable.
When the formula shows (eg) "Test", I can click that value and I get an error.
Is this a bug? Am I doing something wrong? I'm using Office Standard 2013.
Already answered here, I think? Summary: when Excel sees the Hyperlink function in the formula, it makes the cell followable, like a hyperlink. You can't prevent that, apparently, but you can give the else output a dummy destination like C:\ to avoid the error.
EDIT: Or better, a destination of "", which does nothing when clicked.
According to this site: http://www.excelforum.com/excel-formulas-and-functions/592520-can-i-create-a-formula-using-concatenate.html
there is a add in that can create formulas from strings called Morefunc.
If that works then you should be able to use the following:
=IF(LEFT(A1;4)="http";CONCATENATE("=HYPER"; "LINK")&"(A1;Link)";IF(A1="";"";A1))
It will return the formula as a string and probably the Morefunc add in can make it a formula.
But I'm not sure about that as I have never used it. There is also some other add in further down mentioned in the thread.

Excel: Cross-sheet reference not working

I'm having trouble with a cross-sheet reference within the same file.
On the second tab named "Disclosures & Identification," there is a set of merged cells at D5:G5 which hold text.
On the first tab, there is a reference to that cell. The formula being used is
"='Disclosures & Identification'!D5. Instead of copying the text from the second tab's field, the formula just appears in the cell.
I have tried renaming the tab (in case the & was the problem); I have tried using the entire set of merged cells in the reference (d5:g5); I have saved the file under a new name and updated to Office 2007 format (old version was 2003, but that should have worked anyway); and I have done what I consider an appropriate amount of searching for the answer (with no luck). Does anyone have an idea as to why this might not be working?
There are 2 possible things:
Make sure the format of the cell is not 'Text'. If it is, change to something else, such as 'General' and then double click in the formula bar and press enter.
Make sure that 'Show Formulas' is OFF. You can find the option under the tab 'Formulas'. Otherwise, you can use Ctrl+`
In case the above doesn't work, ensure your list isn't filtered or the filter is set active. Deactivate the filter and try link again.

Excel background colour changing automatically

Whenever I copy or move a cell in excel, the original cell location changes colour, how can I stop this?
I have tried clearing the format but it doesn't seem to help... and it only occurs in the main area that I am working in (i.e. if I scroll off to the side or bottom it doesn't seem to happen).
Anyone have any ideas? It's quite annoying.
Conditional Formatting should do the trick. Highlight the cells that concern you and use the option if Cell contains value... then select blank. The format should be auto background (or whatever color you would like)
You may find a custom format already there causing the issue. If so just delete it and you should be all set.

Resources