# How to repeat a function through an entire column

1. ## How to repeat a function through an entire column

I have a function in B9 that looks like this
=COUNTIF('0308 Detail'!A:A,'0308 Detail'!A8)

How can I automatically repeat this same function through columns B10, B11, B12.... and increment certain values within the function?

Example
B10 would like
=COUNTIF('0309 Detail'!A:A,'0309 Detail'!A9)

B11 would look like
=COUNTIF('0310 Detail'!A:A,'0310 Detail'!A10)

and so on.....

Copying and pasting is just taking too long.

Thanks,
Greg

2. I think this will show you the techniques:
=COUNTIF('0309 Detail'!A:A,'0309 Detail'!A9)
=INDIRECT("03"&xx&" Detail!"&"A:A")
=ROW(B10)-1 --> 10-1=9
=IF(ROW(B10)-1<10,"0"&ROW(B10)-1,ROW(B10)-1) --> "09" or 10

Together:
=INDIRECT("03"&IF(ROW(B10)-1<10,"0"&ROW(B10)-1,ROW(B10)-1)&" Detail!"&"A:A")

Ola SandstrÃ¶m

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1