# spreadsheet calc on every other cell [closed]

I have the following sequence of data:

     A      B   C   D   E

435     1   B   199
1194    1   C   199 759
1196    1   B   199
1993    1   C   199 797
1994    1   B   199
2303    1   D   199 309


Column E represents the column A minus the previous row in column A. So every other cell in column is calculated. When I drag down, each cell is calculated, instead of every other cell. How can I calculate for every other cell ? Also, I would like to count the number of "B's".

edit retag reopen merge delete

### Closed for the following reason the question is answered, right answer was accepted by Alex Kemp close date 2020-10-16 13:48:21.792978

Spreadsheets of structures needing "every-other-row" formulas are supposed to be badly designed.

You should seriously consider to redesign the sheet before you get in trouble every other day.

( 2017-09-28 17:40:39 +0100 )edit

Thanks, yes agreed, ideally the data should be loaded into a database and normalised, but the data above is simply a benchmark output from a C++ program. So I don't need it to be permanent.

( 2017-10-02 16:14:46 +0100 )edit

Sort by » oldest newest most voted

Hello @bluefrog,

To calculate every other cell, you could enter the following formula into E1, then drag down:

=IF(MOD(ROW(A2);2);"";A2-A1)

To count the number of "B"'s in column C, you could use the formula:

=COUNTIF(C:C;"B")

HTH, lib

more