Spill table column with specified number of blank rows between entries in excel - excel

Is there a cell based function that can spill the entries from a table column whilst inserting a defined number of blank rows between each entry?
For example, In the following image I have the function =FILTER(DisciplineTbl, {1,0,0,0}) in cell P32:
In column S I have inserted what I am hoping to achieve, ideally through a formula in S32 that can spill the contents down the column with the specied empty rows between entries. Is something like this possible with a cell based formula or will it require a VBA solution?

Try:
=LET(
ζ, A1:A4,
δ, 5,
ε, δ + 1,
ξ, SEQUENCE(ε * ROWS(ζ) - δ, , 0),
IF(MOD(ξ, ε), "", INDEX(ζ, 1 + QUOTIENT(ξ, ε)))
)
where δ (5 here) is the number of blank rows to be inserted between each entry.
A1:A4 can of course be replaced with a dynamic spill range.

Related

Excel: How do I efficiently condition a cell so that I can identify a cell with observation counts less than a certain number?

Basically I wanted to only extract the top 2 rows for every Entry #, but if the Entry # does not have 2 rows it is not used.
I tried IF statements and eliminating blanks and whatnot, but if this is a large data I would not be able to handle it.
If you don't mind adding a few columns, here's one method. Arrange how you wish.
Column's B and F are your original data.
Column C, in cell C2, input your first value manually (1 in this case).
Then here's the formula for Cell C3:
=IF(ISBLANK(B3),C2,B3)
Cell D2 formula:
=IF(C2=C1,D1+1,1)
Cell E2 formula:
=IF(COUNTIF(C:C,C2)>1,"Yes","No")
Drag down your formulas.
Then you can filter on column E for YES, and filter on column D for 1 & 2.

How to convert this formula from Numbers to Excel: INDIRECT(ADDRESS(MATCH($I;Sheet2::Table 1::B);3;4;TRUE;"Sheet2::Table 1"))?

I provided this formula in a Numbers files that has two sheets, Sheet1 and Sheet2, and it works as I need:
INDIRECT( ADDRESS( MATCH($I;Sheet2::Table 1::B) ;3;4;TRUE;"Sheet2::Table 1") )
I explain what it does:
MATCH - in a cell of Sheet1, it compares the content of the column I (same row as it runs) with the column B of Table 1 of Sheet2;
ADDRESS - when matched, it takes the position of cell (same row matched) but in column C from the Table 1 of Sheet2;
INDIRECT - it takes the content of the cell addressed before.
Now, I need to use it in the original Excel file and I think I'm missing something...(and I can't save the Numbers file in to Excel).
how can I convert it?

Need to copy the contents of a vertical cell into a horizontal cell and then copy the formula horizontal and have it update the references

I want a formula in columns B$10,C$10...to reference the cells in rows
$A3,$A4... and the same for columns B$11,C$11... etc..
Columns Values
alpha 'now
,bravo ',is
,charlie ',the
,david ',time
,egert ',for
.
INSERT INTO TESTTABLE( alpha ,bravo ,charlie ,david egert)
VALUES( 'now' ,'is' ,'the' ,'time' ,'for')
But how do i increment the cell references by one down a column and
across a row?
Place this in cells B10:F10 as an array formula (Ctrl-Shift-Enter to complete), and copy down
=INDEX($3:$7,COLUMN()-1,ROW()-9)
INDEX returns a cell from an array, in this case rows 3 to 7. The second and third parameters specify the row and column in that array to return. COLUMN() and ROW() return the column or row number of the cell the formula is in, in this case cells B10:F10. Referring to Row by Column number and Column by Row number causes to the data to transpose.
So, for example consider cell C10: COLUMN() = 3, ROW() = 10, so INDEX($3:$7,3-1,10-9) refers to cell 2nd row, 1st column of $3:$7ie A4

Change a flat table to a PivotTable/crosstab that shows TEXT results instead of calculations

I have a large file of survey-type information that I would like to change the format of: from a flat table to a crosstab. PivotTables don't appear to be what I want for this purpose because each response is unique text, so I couldn't assign a numeric value to the responses and then convert that using a formula once in the PivotTable.
This is the format that I have versus the format that I want: http://imgur.com/qLjp4v2
You can use a combination of 3 formulas to pivot the table. Assuming that the first key (eg Case) is in column A, the second key (eg. Question) in column B and the results (eg. Response) in column C and there are say 100 rows of data.
Column header formula (in cell F1): =IFERROR(OFFSET($B$1, MATCH(0, COUNTIF($E1:E1, $B$2:$B$101), 0), 0), "")
Row header formula (in cell E2): =IFERROR(OFFSET($A$1, MATCH(0, COUNTIF(E$1:E1, $A$2:$A$101), 0), 0),"")
Cell data formula (in cell F2): =IFERROR(OFFSET($C$1, MATCH($E2&F$1, $A$2:$A$101 & $B$2:$B$101, 0), 0), "")
Copy the Column headers across row 1, the Row headers down column E and the cell data formulas to fill the table.
The Row and Column headers use a formula to extract just the unique values from the table. The Cell Data formula performs a dual key lookup to populate the results.
Sorry I don't have enough points to post images yet, you'll have to imagine the result...
This is what I ended up doing:
Created a new tab, pasted my case numbers in column A and removed duplicates
Removed duplicates from my questions and transposed them into row 1 of my new sheet
Created a new column in my source sheet and entered a formula to concatenate the case number and the question text
Started a formula in the new table to concatenate my row and column name for that cell, use VLOOKUP (because I do poorly with Index and Match) to find the right case number + question text combination that I had created in my source sheet, and return the question response.
This is the basic VLOOKUP formula that I used:
=VLOOKUP(CONCATENATE($A2,B$1),'Leads with Q&A'!$J:$K,2,0)
Leads with Q&A is my source sheet. Column J contains the concatenation, column K contained the question responses.
To clean up the errors from cases that did not have a question response and cases that did not ask one the questions, I used this:
=IFERROR(IF(VLOOKUP(CONCATENATE($A2,B$1),'Leads with Q&A'!$J:$K,2,0)=0,"",VLOOKUP(CONCATENATE($A2,B$1),'Leads with Q&A'!$J:$K,2,0)),"")

MS Excel: SUMIF where the criteria is a range of non continguous cells

I would like to add up every 8th column in row 7 (starting at M7), where the contents of the 8th column in row 2 (starting at M2) ALL equal the contents of cell I6.
Row 7 is numbers.
Row 2 and cell I6 are text.
Can anyone help please?
Thanks for reading.
Clara
You can use a single formula with a similar approach to that suggested by Dan, i.e.
=SUMPRODUCT((MOD(COLUMN(M7:IV7)-COLUMN(M7),8)=0)*(M2:IV2=I6),M7:IV7)
Note the use of two COLUMN functions which will ensure that the formula still gives the same result if columns are inserted before the data.
I used column IV as the last column - (it's the last column in Excel 2003) - adjust as required
Of course this would be much easier to do if there was a common header value in row 1 to identify the columns in question, e.g. if M1, U1, AC1 etc. all contain X then the total can be calculated using SUMIFS like this:
=SUMIFS(7:7,1:1,"X",2:2,I6)
You could use mod to decide if it's an "8th" row or not, after that it's easy if you just create a bunch of helper rows
(move rows down as necessary)
in row X use the formula (dragged across all columns) =(MOD(COLUMN(A1), 8) == 5)*1 to get 1s in 8th columns starting at column M (hence the =5). Note that the *1 is to convert the TRUE/FALSE to 1/0. Also note this returns true for column E which you can manually ignore.
in the next row enter the formula =A2=$I$6
In the next row just add the previous two rows (you can really combine all three of these rows into on row with the formula =(MOD(COLUMN(A1), 8) == 5) + (A2=$I$6)
SUMPRODUCT this last row with row 7 in the cell that you desire this final sum to be

Resources