Ask Your Question
0

If Then for cell value automatically delete row [closed]

asked 2013-01-22 21:34:19 +0200

anonymous user

Anonymous

updated 2013-06-15 00:14:10 +0200

manj_k gravatar image

Here's what I want, I haven't found a way to make it possible...

A1 is references a list of 2 items on sheet 2, the items being "0" and "delete" cell A2 has the following code: If A1 = "delete" then Delete Row ...So that the row (not necessarily row "1", but a relative row... whichever row has the above code in it and the cell to the left of the cell with the code has "delete" in it...which is cells A1 and A2 in the above example)

Sorry if i'm repetitive and lame, I just really need to find the solution to this.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-03-03 19:07:23.890007

Comments

@Anonymous I'm sure it's possible, but you'll need to know how to write Macros first.

crazyskeggy gravatar imagecrazyskeggy ( 2013-05-29 21:32:59 +0200 )edit

I think you should explain this with more details; I am pretty good with Calc but I am having trouble to understand what you are trying to do... or I should keep reading until it gets clear in my head :)

Ljiljan gravatar imageLjiljan ( 2013-06-14 00:01:04 +0200 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2014-09-17 13:48:01 +0200

dkso9 gravatar image

Make a copy of your sheet. Insert a new column at the start of the sheet (A - first column). Make an if-then that shows a 1 or some other value if the condition is met, and nothing if not. Then sort on that first column, expanding to all columns. The rows with empty first column value will be on top or bottom. You can delete them in one go.

If you need to reset the order to the previous state, you have to do some other tricks. Insert another column (B), first row (B1) enter value 1, then B2=B1+1. Then copy B2 to the rest of the column rows. Then insert another column (C). Paste the value of B to C, but make sure it copies the values (1,2,3,...), not the calculations. Then do the sorting of A, remove the empty A rows, then sort on C.

edit flag offensive delete link more
0

answered 2013-08-17 22:52:38 +0200

jofilho gravatar image

If I understood, the behavior that you want is a little bit difficult to reproduce automatically. It's because, using your formula, whenever your spreadsheet was updated a new cell will be deleted. That's how the things work on calc. If you change a single cell, all others cells will be recalculated, which in your case can mean keep deleting cells automatically and indefinitely.

I guess you can find in a different solution. Why do you not simply hide the cell's content? I don't know your problem, of course, so I'm only trying to work around it.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-01-22 21:34:19 +0200

Seen: 2,575 times

Last updated: Sep 17 '14