Return value of every nth column

delta_negative

New Member
Joined
Mar 11, 2013
Messages
37
A worksheet has data from machine oil pressure readings in column range A:D. The need is for a formula or macro to perform the following;

Starting at row 1 copy the values of A:D to F:I every 5th row so that row 1 F:I will contain the values of row1 A:D, row 2 F:I will contain the values of row 6 A:D, row 3 F:I will contain the values row 11 A:D, etc. It would be great to have the same procedure followed every 15th row starting at row 1 K:N, then row 16, then row 31, etc. Sheet has 100s of Ks of rows so would it be possible to automatically perform this to the last row, even when new rows are being added?

Column G has formula MAX(B1:B5), Column H has formula MIN(C1:C5) with same formula in row6, row 11,etc.

Have been copying down formula but it is time consuming as well as a problem if I accidentally unclick with the mouse.

Any help greatly appreciated.
 
Last edited:
Hi,

I tried using this formula for my issue, but I think I am doing something wrong.
I have cumulative data from Jan to Dec in row 3 (horizontally). I need to pull the value of March, June, Sep and Dec (every quarter) in a different sheet , same workbook.
the formula INDEX(A:A,(ROWS(A$3:A3)-1)*3+1) did not return the value of March (I changed the 5 into 3). Grateful for any suggestions.
:confused:

 
Upvote 0

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi, thanks so much for your reply.:)

I tried your suggestion:
INDEX(data!A3:A3,(COLUMNS(data!$A3:A3)-1)*3)+3

it did return the value of March, but when I copy to the right to extract the June value etc . I get an error #REF !

the values are in sheet " data" and I need to copy only the values of March/June/Sep/Dec to another sheet.

Cumulative since beginning of year
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2 4 5 7 9 14 17 22 22 24 26 34

Thanks...


****** id="cke_pastebin" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">
INDEX(data!A3:A3,


<tbody>
</tbody>

<tbody>
</tbody>
</body>
 
Upvote 0
You changed 3:3 to A3:A3

Ok, now I have this: INDEX(data!3:3,(COLUMNS(data!$A3:A3)-1)*3)+3.
I am not getting the correct value anymore and also strange numbers are appearing..:confused:
The values in sheet "data" are this:

JanFebMarAprMayJunJulAugSepOctNovDec
2457914172222242634

<tbody>
</tbody>

<tbody>
</tbody>






After applying the formula (this table is located in a different sheet) I get this result:
MarJunSepDec
781725

<tbody>
</tbody>




while it should be this:
MarJunSepDec
5142234

<tbody>
</tbody>




Thank you for your time, I really appreciate this. I am trying to figure this out for a very long time now.
 
Upvote 0
somehow that formula is not working for me:(.

However I found something that does the trick, I have to test it on long series though:
INDEX(data!$A$3:$L$3,COLUMN()-2)*3+3)

<tbody>
</tbody>

I don't know why this worked, especially the -2 ?

Thanks again..(y)
 
Upvote 0

Forum statistics

Threads
1,214,987
Messages
6,122,614
Members
449,090
Latest member
vivek chauhan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top