Take a range and space it out into columns

%3CLINGO-SUB%20id%3D%22lingo-sub-2737441%22%20slang%3D%22en-US%22%3ETake%20a%20range%20and%20space%20it%20out%20into%20columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2737441%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20grab%20all%20the%20values%20in%20a%20range%20(C2%3AC224%20is%20the%20current%20one%2C%20but%20it%20will%20sometimes%20be%20a%20smaller%20or%20larger%20range%20in%20the%20same%20column)%20from%20one%20sheet%20and%20move%20those%20to%20another%20sheet%20but%20I%20want%20them%20in%20the%20same%20row%20spaced%20out%20to%20every%204th%20column%2C%20leave%20the%20cells%20in%20between%20blank.%20Is%20there%20a%20formula%20for%20this%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2737441%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2737612%22%20slang%3D%22en-US%22%3ERe%3A%20Take%20a%20range%20and%20space%20it%20out%20into%20columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2737612%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1151393%22%20target%3D%22_blank%22%3E%40JennaSmith495%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENo%20specific%20formula%20comes%20to%20my%20mind%20to%20do%20the%20spacing.%20The%20TRANSPOSE%20function%20can%20take%20the%20range%20and%20render%20it%20in%20columns%20rather%20than%20rows%20adjacent%20to%20the%20original%20or%20in%20another%20sheet.%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DTRANSPOSE(C2%3AC224)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EBUT%2C%20may%20I%20ask%20you%20why%3F%20Will%20you%20be%20filling%20in%20the%20blank%20columns%20once%20they're%20there%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20wondering%20if%20there%20might%20be%20a%20different%20way%20to%20accomplish%20whatever%20your%20long%20term%20goal%20is.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMost%20of%20us%20who%20use%20Excel%20a%20lot%20are%20resistant%20to%20designs%20that%20involve%20a%20lot%20of%20blank%20rows%20or%20columns....it's%20one%20thing%20to%20space%20things%20out%20for%20a%20printed%20report%2C%20but%20another%20to%20try%20to%20work%20with%20data%20that%20has%20lots%20of%20spaces.....%3C%2FP%3E%3CP%3ESo%20that's%20why%20I%20ask%20what%20otherwise%20might%20sound%20like%20none%20of%20my%20business.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2737652%22%20slang%3D%22en-US%22%3ERe%3A%20Take%20a%20range%20and%20space%20it%20out%20into%20columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2737652%22%20slang%3D%22en-US%22%3EIt%20is%20for%20a%20report%20that%20displays%20scientific%20data.%20The%20spacing%20is%20to%20have%20a%20section%20for%20each%20sample.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2737733%22%20slang%3D%22en-US%22%3ERe%3A%20Take%20a%20range%20and%20space%20it%20out%20into%20columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2737733%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1151393%22%20target%3D%22_blank%22%3E%40JennaSmith495%3C%2FA%3E%26nbsp%3Bwrote%3A%3CEM%3E%26nbsp%3BIt%20is%20for%20a%20report%20that%20displays%20scientific%20data.%20The%20spacing%20is%20to%20have%20a%20section%20for%20each%20sample.%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHelp%20me%20understand%3A%20are%20the%20current%20cells%20(C2%3AC224)%20labels%20for%20the%20samples%2C%20dates%2C%20what%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20general%2C%20Excel%20tables%20work%20better%20when%20each%20ROW%20is%20a%20complete%20record%20unto%20itself.%20Most%20of%20the%20Excel%20functions%20that%20summarize%2C%20tabulate%2C%20etc.%2C%20are%20perfectly%20fitted%20for%20series%20of%20records%20arrayed%20like%20that%2C%20in%20rows.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fexceljet.net%2Fexcel-tables%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fexceljet.net%2Fexcel-tables%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2737872%22%20slang%3D%22en-US%22%3ERe%3A%20Take%20a%20range%20and%20space%20it%20out%20into%20columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2737872%22%20slang%3D%22en-US%22%3EThis%20first%20one%20I%20am%20working%20on%20is%20the%20site%20code%20but%20there%20are%20many%20cells%20where%20I'm%20looking%20to%20do%20the%20same%20thing%20for%20the%20sample%20date%20and%20same%20ID%2C%20etc.%20The%20point%20of%20this%20report%20is%20for%20it%20to%20be%20readable%20to%20the%20average%20client%20that%20might%20not%20have%20a%20ton%20of%20scientific%20knowledge.%20I'm%20not%20sure%20I%20have%20much%20wiggle%20room%20to%20change%20the%20format%20our%20scientist%20wants.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2738034%22%20slang%3D%22en-US%22%3ERe%3A%20Take%20a%20range%20and%20space%20it%20out%20into%20columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2738034%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1151393%22%20target%3D%22_blank%22%3E%40JennaSmith495%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20experience%20with%20arrays%20of%20tables%20and%20an%20array%20of%20clients%20is%20that%20people%20respond%20to%20clarity%2C%20whether%20it's%20in%20rows%2C%20columns%20or%20separate%20pages.%20Even%20scientists%20appreciate%20clarity%2C%20and%20some%20are%20capable%20of%20changing%20previous%20convictions.%20%5Binsert%20smiley%20face%20here%5D%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2738148%22%20slang%3D%22en-US%22%3ERe%3A%20Take%20a%20range%20and%20space%20it%20out%20into%20columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2738148%22%20slang%3D%22en-US%22%3EI%20have%20a%20clear%20report%20example%20and%20am%20trying%20to%20automate.%20Thank%20you%20for%20the%20suggestions%2C%20but%20I%20am%20going%20to%20continue%20to%20search%20for%20how%20to%20do%20this.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2738278%22%20slang%3D%22en-US%22%3ERe%3A%20Take%20a%20range%20and%20space%20it%20out%20into%20columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2738278%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1151393%22%20target%3D%22_blank%22%3E%40JennaSmith495%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20your%20horizontal%20array%20of%20headers%20contains%20only%20blanks%20between%20adjacent%20labels%20you%20could%20use%20an%20Excel%20365%20formula%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel-formula%22%3E%3CCODE%3E%3D%20LET(%0A%20%20k%2C%20%20%20SEQUENCE(1%2C%204*ROWS(Labels)%2C4)%2C%0A%20%20hdr%2C%20INDEX(Labels%2C%20QUOTIENT(k%2C4))%2C%0A%20%20IF(MOD(k%2C4)%3D0%2C%20hdr%2C%20%22%22))%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3BThis%20is%20also%20possible%20in%20older%20versions%20of%20Excel%20by%20using%20column%20numbers%20but%20is%20more%20obscure.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

I am trying to grab all the values in a range (C2:C224 is the current one, but it will sometimes be a smaller or larger range in the same column) from one sheet and move those to another sheet but I want them in the same row spaced out to every 4th column, leave the cells in between blank. Is there a formula for this?

7 Replies

@JennaSmith495 

 

No specific formula comes to my mind to do the spacing. The TRANSPOSE function can take the range and render it in columns rather than rows adjacent to the original or in another sheet.

=TRANSPOSE(C2:C224)

BUT, may I ask you why? Will you be filling in the blank columns once they're there? 

 

I'm wondering if there might be a different way to accomplish whatever your long term goal is.

 

Most of us who use Excel a lot are resistant to designs that involve a lot of blank rows or columns....it's one thing to space things out for a printed report, but another to try to work with data that has lots of spaces.....

So that's why I ask what otherwise might sound like none of my business.

It is for a report that displays scientific data. The spacing is to have a section for each sample.

@JennaSmith495 wrote: It is for a report that displays scientific data. The spacing is to have a section for each sample.

 

Help me understand: are the current cells (C2:C224) labels for the samples, dates, what?

 

In general, Excel tables work better when each ROW is a complete record unto itself. Most of the Excel functions that summarize, tabulate, etc., are perfectly fitted for series of records arrayed like that, in rows. 

https://exceljet.net/excel-tables

 

This first one I am working on is the site code but there are many cells where I'm looking to do the same thing for the sample date and same ID, etc. The point of this report is for it to be readable to the average client that might not have a ton of scientific knowledge. I'm not sure I have much wiggle room to change the format our scientist wants.

@JennaSmith495 

 

My experience with arrays of tables and an array of clients is that people respond to clarity, whether it's in rows, columns or separate pages. Even scientists appreciate clarity, and some are capable of changing previous convictions. [insert smiley face here]

I have a clear report example and am trying to automate. Thank you for the suggestions, but I am going to continue to search for how to do this.

@JennaSmith495 

If your horizontal array of headers contains only blanks between adjacent labels you could use an Excel 365 formula

= LET(
  k,   SEQUENCE(1, 4*ROWS(Labels),4),
  hdr, INDEX(Labels, QUOTIENT(k,4)),
  IF(MOD(k,4)=0, hdr, ""))

 This is also possible in older versions of Excel by using column numbers but is more obscure.