user5520049
user5520049

Reputation:

How to delete cell contains zero and the cells after it

I need to delete all numbers (cell contents) after the cell that contains zero in the same row! how may I do it?

enter image description here

Upvotes: 1

Views: 94

Answers (1)

JMP
JMP

Reputation: 4467

You will need to create a new table, or use VBA, as a formula will overwrite the present value of the table.

You can use a formula such as:

=IF(OR(A1=0,E1=0),0,A1)

You first need to create a column of x's after the table. The formula then reads the corresponding cell from the original table, and if this is zero, OR the previous cell in the new table is zero (this is where the x's as used - to allow the new table to get started), then place a zero in the new table, or place the existing value.

remove_zeroes

Upvotes: 1

Related Questions