![]() |
A "IF" result that will not result in a selected field when using
When using the IF function, is there a result, either "true" or "false that
will not trigger the END key to stop at that specific cell. For example, if I use =IF(A1B2, 2," "), and the statement is false, the cursor will stop on that cell when using the END key because there is a space (" ") in that cell. I have tried using =IF(A1B2, 2,"") and =IF(A1B2,2), but everything produces a result that will stop the cursor on that cell when using the END key. |
A "IF" result that will not result in a selected field when using
The End key's function is not based on the value of a cell. It is based on
whether the cell is empty or not. A cell with the formula below, produces an empty value. But the cell, itself, is not empty and using End will stop on this cell if it is in the path of the direction you are going. ="" I don't know of a way to change that though standard excel keystrokes without using some code. You could use the code below and then set each macro to fuction with a specific key combination (ex. - to move: right, Ctrl + R...Left, Ctrl + L...Up, Ctrl + U...Down, Ctrl + D). Sub endRight() ActiveCell.End(xlToRight).Select Do While ActiveCell.Value = "" If ActiveCell.Column = 256 Then End ActiveCell.End(xlToRight).Select Loop End Sub Sub endLeft() ActiveCell.End(xlToLeft).Select Do While ActiveCell.Value = "" If ActiveCell.Column = 1 Then End ActiveCell.End(xlToLeft).Select Loop End Sub Sub endUp() ActiveCell.End(xlUp).Select Do While ActiveCell.Value = "" If ActiveCell.Row = 1 Then End ActiveCell.End(xlUp).Select Loop End Sub Sub endDown() ActiveCell.End(xlDown).Select Do While ActiveCell.Value = "" If ActiveCell.Row = 65536 Then End ActiveCell.End(xlDown).Select Loop End Sub "A Long" wrote in message ... When using the IF function, is there a result, either "true" or "false that will not trigger the END key to stop at that specific cell. For example, if I use =IF(A1B2, 2," "), and the statement is false, the cursor will stop on that cell when using the END key because there is a space (" ") in that cell. I have tried using =IF(A1B2, 2,"") and =IF(A1B2,2), but everything produces a result that will stop the cursor on that cell when using the END key. |
All times are GMT +1. The time now is 12:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com