1

For example, if n=4, I want to draw a border after every fourth column. So it looks like this if n=4 (and this is for all the columns):

SO49163245 Q example

I tried conditional formatting but it draws the border to the right of that cell, and not for the entire column.

pnuts
  • 58,317
  • 11
  • 87
  • 139
kbkbkb
  • 43
  • 3
  • What is the formula you tried? If it works for the first row, then simply apply it to a larger range. *Formula -> Conditional Formatting -> Manage* and modify the *Cell Range*. – Jim K Mar 08 '18 at 13:20
  • maybe it's too easy, but can't you put a border to col D, and copy the col? When you're getting started, just paste as-is; when you already have data: paste formats? – Sebastian Rothbucher Mar 10 '18 at 14:21

1 Answers1

2

Select all cells and apply Conditional Formatting with a Formula is such as:

MOD(COLUMN(),4)=0

and a Cell Style with Borders similar to:

SO49163245 example

pnuts
  • 58,317
  • 11
  • 87
  • 139