Transfer every nth cell to another column

Svenicide

New Member
Joined
Jan 26, 2015
Messages
3
Hi everyone,

I'm trying to copy hourly meteorological data from every 24th cell in a column to a new column, then repeat this going down eg. for 12:00:00 copy data in cells B3, B27,..., B8763 to E3,E4,...,E364, and then for 01:00:00 copy data in cells B4, B28,...,B8764 to F3,F4,...,F364 and so on.

I have tried using the OFFSET function (as shown on image) to no avail. I'm guessing this is probably a VLOOKUP formula, but couldn't get it to work.

Would prefer not to use VBA code (I have several spreadsheets and there is a lot more data than this).

EDIT: Column A contains the Julian date and time (probably why VLOOKUP is not working?)

Part of the spreadsheet is at this link:

http://imagizer.imageshack.us/a/img538/7222/vcHpbp.jpg


Kind regards
 
Last edited:

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
I can't test because your data is an image.

Having said that though, I believe you can do this yourself with these hints:

Take your working formula.

Use the following functions with it:

row
Indirect

So, how it works is where you have your cell references, sub in (Row(A4)-Row(A$3))*24 to get the row that it SHOULD reference for the second set. Each time you drag this down it will resolve to 24, 48 etc etc etc.

Once done you just need that in an Indirect function to resolve the string to an address.

The formula would be as simple as (in E4) =Indirect("B" & (Row(A4)-Row(A$3))*24)

Hope that helps :)

Dan
 
Upvote 0
Hi Dan,

Thank you very much for your help - I've tried it but I'm not entirely sure how the code should read.

Below should be the HTML for part of the spreadsheet if you could take a look and see if the formula you're proposing would work?


Excel 2007
ABC
2Obs Temp (C)12:00:00 AM
312:00:00 AM1717
41:00:00 AM1718
52:00:00 AM1717
63:00:00 AM1718
74:00:00 AM1619
85:00:00 AM1820
96:00:00 AM1920
107:00:00 AM2021
118:00:00 AM2020
129:00:00 AM2120
1310:00:00 AM2220
1411:00:00 AM2321
1512:00:00 PM2322
161:00:00 PM2326
172:00:00 PM2324
183:00:00 PM2326
194:00:00 PM2324
205:00:00 PM2327
216:00:00 PM2220
227:00:00 PM2019
238:00:00 PM1920
249:00:00 PM1822
2510:00:00 PM1723
2611:00:00 PM1823
2712:00:00 AM1721
MR EXCEL
Cell Formulas
RangeFormula
C4=INDIRECT("B"&(ROW(A4)-ROW($A$3))*24)
C5=INDIRECT("B"&(ROW(A5)-ROW($A$3))*24)
C6=INDIRECT("B"&(ROW(A6)-ROW($A$3))*24)
C7=INDIRECT("B"&(ROW(A7)-ROW($A$3))*24)
C8=INDIRECT("B"&(ROW(A8)-ROW($A$3))*24)
C9=INDIRECT("B"&(ROW(A9)-ROW($A$3))*24)
C10=INDIRECT("B"&(ROW(A10)-ROW($A$3))*24)
C11=INDIRECT("B"&(ROW(A11)-ROW($A$3))*24)
C12=INDIRECT("B"&(ROW(A12)-ROW($A$3))*24)
C13=INDIRECT("B"&(ROW(A13)-ROW($A$3))*24)
C14=INDIRECT("B"&(ROW(A14)-ROW($A$3))*24)
C15=INDIRECT("B"&(ROW(A15)-ROW($A$3))*24)
C16=INDIRECT("B"&(ROW(A16)-ROW($A$3))*24)
C17=INDIRECT("B"&(ROW(A17)-ROW($A$3))*24)
C18=INDIRECT("B"&(ROW(A18)-ROW($A$3))*24)
C19=INDIRECT("B"&(ROW(A19)-ROW($A$3))*24)
C20=INDIRECT("B"&(ROW(A20)-ROW($A$3))*24)
C21=INDIRECT("B"&(ROW(A21)-ROW($A$3))*24)
C22=INDIRECT("B"&(ROW(A22)-ROW($A$3))*24)
C23=INDIRECT("B"&(ROW(A23)-ROW($A$3))*24)
C24=INDIRECT("B"&(ROW(A24)-ROW($A$3))*24)
C25=INDIRECT("B"&(ROW(A25)-ROW($A$3))*24)
C26=INDIRECT("B"&(ROW(A26)-ROW($A$3))*24)
C27=INDIRECT("B"&(ROW(A27)-ROW($A$3))*24)
C2:Z2{=TRANSPOSE(A3:A26)}
C3:Z3{=TRANSPOSE(B3:B26)}
Press CTRL+SHIFT+ENTER to enter array formulas.


Kind regards,

Joel
 
Upvote 0

Forum statistics

Threads
1,216,089
Messages
6,128,750
Members
449,466
Latest member
Peter Juhnke

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