Excel If statememnts

M

mjlucas49

I have the following function in an Excel spreadsheet. How can I change it
to delete a row instead of just printing No? I am thinking of how I use the
ALt key and arrows to get to the Edit menu and delte row option.


=IF(A4<>A5,"No",IF(AND(B4=B5),"Yes","No"))

Thanks in advance.
Michael Lucas
 
M

mjlucas49

Chip Pearson said:
A formula cannot delete rows.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


message

Could I copy the resultss that my functions provide so they are the values, then sort by the values, and the delete the row I don't need?
Michael
 
D

Dave Peterson

Maybe you could just hide the rows you don't want to see.

You could apply Data|Filter|Autofilter to that column. Then use the dropdown
arrow to show the rows you want to see.

If you really wanted to delete the "no's", you could show those rows, then
select those visible cells and edit|Delete|entire row.

Then data|Filter|Show all (to see everything)
or
data|filter|autofilter (to remove the filter arrows)
 
M

mjlucas49

Dave Peterson said:
Maybe you could just hide the rows you don't want to see.

You could apply Data|Filter|Autofilter to that column. Then use the dropdown
arrow to show the rows you want to see.

If you really wanted to delete the "no's", you could show those rows, then
select those visible cells and edit|Delete|entire row.

Then data|Filter|Show all (to see everything)
or
data|filter|autofilter (to remove the filter arrows)
 
Top