PDA

View Full Version : Excel Guru Help



firebane
11-29-2013, 11:35 PM
I have a bit of a quandry I am try to figure out how to get excel to count a number in every other cell starting from one of the cells in ROW 1.

So in this picture if you place 1 in A1 .. the rest of the gray cells get a number sequentially numbered. So the first row would have:
1 2 3 4 5 in the first row
8 9 10 11 12 in the second row
15 16 17 18 19 in the third row
22 23 24 25 26 in the fourth row
29 30 31 in the 5th row

The reason the numbers fall this way is because for a scheduling calendar and weekends don't exist. But if you put 1 in the 2 colum then it start counting from up to 31.

It would be nice if I could specify the days in the month so it would also only count up to that many numbers.. ie .. IF(A11=28) THEN COUNT(1:28) etc.

Is this possible to do with conditional formatting or would this end up having to be a macro or visual basic script?

woodywoodford
11-30-2013, 11:58 AM
You can probably use some combination of array and indirect to count every other one. I'm not really clear how you get your numbers though... you want to input 1 into A1, and then C1, E1, G1 and I1 would fill wtih 2 through 5 automatically?

edit: or are you just trying to basically create a weekday calendar with two columns for each day? In which case the easiest way is just set up a sum function in each of your cells, so that you input A1 then C1=A1+1, E1=C1+1, etc. New row just make it I1+3.

Then for the max value, just have a cell somewhere (say K1) where you put it in, then adjust each of the formula's above with an if statement, ie.

=if((A5+3)>$K$1,"",A5+3)