Excel: Change ####### in a cell to n/a - excel

Excel question how to change ####### (shows up this way when data exceeds what the cell can display) in a cell to n/a without using VBA? I can do it manually by expanding the width of a column but I want to keep the spreadsheet small and don't need 9999999% its meaningless. Thanks in advance.

Select one or more cells you want to change; perhaps start with the cells that are showing 'meaningless' values like 9999999%. Note the 'active cell'. This is typically the cell in the top-left corner of a selected group of cells. For the sake of demonstration, that cell will be D2.
Use Home ► Styles ► Conditional Formatting ► New Rule. When the New Formatting Rule dialog opens, choose Use a formula to determine which cells to format then supply the following in the Format values where this formula is true: textbox.
=ABS(D2)>10
A raw value of 10 is 1000%. Anything that is greater than 1000% or less than -1000% will receive the conditional formatting. Note that D2 is involved in the formula.
Click Format and when the Format Cells dialog opens, go to the Number tab and choose Custom from the list down the left. Supply the following in the Type: textbox,
"n/a"
Click OK to accept the new formatting then OK again to create the new rule.
Repeat for other cells that may have values showing other scope(s) that you consider 'meaningless'.

Related

Conditional formatting depending on data from a column

I'd like to create a rule that writes "100%" in column A whenever I write "end" in column B.
So it would be something like this:
[] X
100% end
[] Y
The brackets represent an empty cell.
I've tried:
IF(B1:B3="end",100%,"")
but I would like to leave the cells on column A empty, with no data or formulas, if the respective cell in column B doesn't contain "end".
So I've thought about adding a new rule with conditional formatting but it's not working. Any solutions?
Can be achieved with CF but rather nastily. You would need to fill ColumnA first, say with 1s - but can be hidden by (standard) formatting the text to match the background colour (ie usually white).
Then clear any CF from and select ColumnA, HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=B1="end"
Format..., select Black (probably) font and Custom Number format of:
00%
OK, OK.
If your blank cells must remain blank in reality rather than appearance then CF alone is not a solution for you.
Edit:
You can get a value to show in a cell based on the value of another cell, without having anything* in the cell, and without VBA:
                                                         *kinda
Using cells I2:J9 as an example, the steps are:
Click I2, then Ctrl+1 to open the Format Cells dialog.
On the Number tab, click Custom, then in the Type box enter: ;;; and click OK.
Hit Alt+O+D+N to add new Conditional Format and choose Use a formula to determine which
cells to format.
In the Format values where... box, enter: =J2="end" (If Excel adds $'s, remove them), then click Format...
On the Number tab, click Custom, then in the Type box enter: ;;;"100%" . (Optionally set a color, font, etc.) then hit ENTER 3 times to return to the
worksheet.
Click I2, hit your SPACEBAR once and then hit ENTER. (* Fine, I
confess: the cell isn't totally empty.)
Click I2 and hit Ctrl+C to Copy.
Select I2:J9 and press Alt+E+S+T then hit
ENTER to Paste Formats.
Now when you type end into any of J2:J9, the corresponding cell in column I will display 100%.
You can also repeat this process to add additional conditions to the same cells if needed.
Original Answer: (Alternative Solutions)
Sometimes I get stuck spending too much time on a question about a very minor issue. This is one of those times. :)
Thinking further about your question, I suspect you might not have meant you need the "cells on column A empty, with no data or formulas", but perhaps you mean you want the cells to "appear empty".
Example:
These cells do appear empty, unless you to click on the cell and then look at the formula bar:
...but the formula bar can be hidden too:

How to generate an error message when a particular cell is blank

I have two columns in excel in one column i have system id,name,salary,date in other column i need to enter the corresponding values. If there is no value for a particular row then an error message should be generated. Is there a way to do it in excel??
example:
Column 1 Column 2
system id 10
name
salary 1000
date
In the above example there is no data for name and date columns.Is there any way that we can automatically generate an error message saying that there is no data in that particular cell. Thanks in Advance
Try using Data Validation available in Data menu. I think it can work for you.
Lets use both conditional formatting and a formula.
Setting the Stage:
We will apply conditional formatting to cell B1 and use the format painter to apply the change to all the other cells.
Click "Conditional Formatting" and navigate to "New Rule":
Click "Use formula to determine which cells to format" and enter the formula "ISBLANK(YourCellHere)" into the text box. Replace "YourCellHere" with the first cell you want to apply conditional formatting to. In this example "B1" is that cell. You will also need to specify how blank cells should be formatted. This is accomplished by selecting options via the "Format..." button. In this example's "Red" was selected for the "Fill".
Click the "Format Painter" button and drag the brush over the cells the conditional formatting should be applied to.
You can use if() and isblank() together as shown in the example below
Row A B C
1 system id 10 =if(isblank(B1),"No value","Value present")
2 name
3 salary 1000
4 date

How can I color a cell based on character capitalization?

I have a list of text values I want to show as a drop down menu, which is mentioned below.
If the value contains capital letters, I want the cell to be colored blue. On uncapitalized letters, I want to use a yellow shading.
I have tried many things, but was unable to get what I want. Can I use conditional formatting to recognize the difference between small and capital letters?
{d;D;EZ;F;f;g;G;s;S;SU;U;u}
For the purpose of this example, I have assumed your dropdown list to be located in cell A1. Make sure to edit the formulas to fit your needs.
Go to conditional formatting and create three rules:
Select Use a formula to determine which cells to format, enter=EXACT(A1,UPPER(A1)) and format the cell with blue fill color.
Select Use a formula to determine which cells to format, enter=EXACT(A1,LOWER(A1)) and format the cell with yellow fill color.
Select Format only cells that contain. Under "Format only cells with:" select Blanks. There will be no need to change the formatting.
Hope this helps!
1. Create the drop down list
Select the cell where the drop down menu should be placed.
On the Data ribbon tab click 'Data Validation'.
Select Allow: List
Enter your text values at Source: without the curly brackets. The separator can differ from your localization. Standard english computers are using the comma as the separator. On my German machine, I have to use a semicolon.
Click OK. Your cell now has a fancy drop down button on the right.
2. Conditional formatting
Select the cell containing the drop down list
On the Home tab, click Conditional Formatting -> New Rule
Select 'Use a formula to determine which cells to format'
At 'Format values where this formula is true:' enter this formula:
=CODE(A1)<=90
Click format and select a blue cell shading.
Repeat the last steps to enter the formula for the yellow shading:
=CODE(A1)>=97
Click format and select a yellow cell shading.
Pay attention that you have to change A1 to the actual location of your drop down cell.

Changing a data type in excel based on a variable

I have a formula:
=IF($T$23="D",SUMIF('683378'!$B$14:$B$8099,A2,'683378'!$ED$14:$ED$8099)*$T$24,SUMIF('683378'!$B$14:$B$8099,A2,'683378'!$ED$14:$ED$8099))
I have a summary tab where $T$23="D" is either "D" for dollars or "U" for units which changes the calculations throughout the report.
Does anyone know how I can also get the data type to change when entering a D or a U to either currency or Number?
thanks!!!
It looks like you are trying to change the cell formatting based on the selection of D (Dollar) or U (Unit). This can be done with Conditional Formatting.
Click Conditional Formatting then New Rule
Click Use a formula to determine which cells to format
In the Formula box enter the following formula =Summary!$T$23="D" (I guessed on the summary sheet name)
Click the Format... button
Format as Currency or whatever formatting you prefer and click OK then OK again
Repeat items 1-5 again for your unit formatting, changing the formula to =Summary!$T$23="U"
That should do it for you.

Conditionally formatting if multiple cells are blank (no numerics throughout spreadsheet )

I have created a spreadsheet in Excel and am attempting to use Conditional Formatting to highlight a cell or row if any or all of the cells in the last four columns are blank. My columns consist of name of account, store manager, city, state, visit 1, visit 2, visit 3 and visit 4.
When an account is visited notes are written in the "Visit" cell and if an account does not need a visit an X is put in each "Visit" column that is not needed (some accounts need one visit, some two, some all four).
Is it possible to have the Account Name and/or Manager Name highlighted when any visits are left blank, indicating they need to set up a visit that is necessary?
I have tried the instructions below but it didn't seem to work for the range of information I was looking for.
Open the 'Conditional Formatting Rules Manager' (Conditional
Formatting->Manage Rules).
Click 'New Rule' and choose "Use a formula to determine which cells
to format".
In the "Format values where this formula is true:" box, enter the
cell which you want to check if blank.
Place a dollar sign in front of the letter of the cell reference to
make it affect only that row, not the whole table or just the cell.
Type ="" at the end of the box to check for if the cell is blank.
Click "Format..." and go to the "Fill" tab to choose a colour to
fill the row if true and click "OK".
Click "Okay" to close the 'New Rule' dialog.
Change the "Applies to" value of the rule you just created to the
scope of the entire table to make the rule apply to it. (If your
table has a reference name, you can enter it here)
Click "Okay to close the 'Conditional Formatting Rules Manager'.
How about just > Format only cells that contain - in the drop down box select Blanks
Select columns A:H with A1 as the active cell.
Open Home ► Styles ► Conditional Formatting ► New Rule.
Choose Use a formula to determine which cells to format and supply one of the following formulas¹ in the Format values where this formula is true: text box.
To highlight the Account and Store Manager columns when one of the four dates is blank:        =AND(LEN($A1), COLUMN()<3, COUNTBLANK($E1:$H1))
To highlight the Account, Store Manager and blank date columns when one of the four dates is blank:        =AND(LEN($A1), OR(COLUMN()<3, AND(COLUMN()>4, COUNTBLANK(A1))), COUNTBLANK($E1:$H1))
Click [Format] and select a cell Fill.
Click [OK] to accept the formatting and then [OK] again to create the new rule. In both cases, the Applies to: will refer to =$A:$H.
Results should be similar to the following.
  
¹ The COUNTBLANK function was introduced with Excel 2007. It will count both true blanks and zero-length strings left by formulas (e.g. "").
The steps you took are not appropriate because the cell you want formatted is not the trigger cell (presumably won't normally be blank). In your case you want formatting to apply to one set of cells according to the status of various other cells. I suggest with data layout as shown in the image (and with thanks to #xQbert for a start on a suitable formula) you select ColumnA and:
HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=AND(LEN(E1)*LEN(F1)*LEN(G1)*LEN(H1)=0,NOT(ISBLANK(A1)))
Format..., select formatting, OK, OK.
where I have filled yellow the cells that are triggering the red fill result.
If you place the dollar sign before the letter, you will affect only the column, not the row.
If you want to have it affect only a row, place the dollar before the number.
You may want to use =isblank() rather than =""
I'm also confused by your comment "no values throughout spreadsheet - just text" - text is a value.
One more hint - excel has a habit of rewriting rules - I don't know how many rules I've written only to discover that excel has changed the values in the "apply to" or formula entry fields.
If you could post an example, I'll revise the answer. Conditional formatting is very finicky.

Resources