Ask Your Question
0

spreadsheet calc on every other cell

asked 2017-09-28 13:28:45 +0100

bluefrog gravatar image

updated 2017-09-28 13:29:12 +0100

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 flag offensive close merge delete

Comments

Spreadsheets of structures needing "every-other-row" formulas are supposed to be badly designed.
As far as I can see experienced users of Calc judge next to unanimous about this.

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

Lupp gravatar imageLupp ( 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.

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

1 Answer

Sort by » oldest newest most voted
1

answered 2017-09-28 14:40:57 +0100

librebel gravatar image

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

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-09-28 13:28:45 +0100

Seen: 54 times

Last updated: Sep 28 '17