columns to rows moving headers - pivot

enter image description here
The table uses the row description (Date) and Header to categorize the values. This is what my output must look like.

Related

Extract rows from table, into another table, where value in column = external value

I'm looking for a formula that would allow me to extract rows from a table where the value in the first column is equal to a reference?
See the table below:
If the value in the first column is equal to 13:00:00, as it is on the right of the pic, extract the relevant row onto a new table. I have attached the spreadsheet to play with.
https://www.mediafire.com/file/eaz7no3263vl3sd/Table.xlsx/file
Just FILTER the range against the reference value:
https://support.microsoft.com/en-us/office/filter-function-f4f7cb66-82eb-4767-8f7c-4877ad80c759

Display headers in Excel only when the range has values

I am trying to Display in Column A (A23:A29) the header of a table only when it has values on either column B (Current Pay) or C (Year to Date).
I am able to display it when both have values, or when B has a value (positive or negative). But I am not able to display the header when only C has a value (but not B). (Also could I remove #N/A when there is no values or both are zero?)
I have attached a picture to show the layout and added some dummy values to show when it works and when it doesn't.
I am using the following formula in column A:
=IF(COUNTA($B23:$C23)=0,"",INDEX(PP[[#Headers],[Column1]],MATCH(TRUE,INDEX($B23:$C23<>0,0),0)))
MATCH(TRUE,INDEX($B23:$C23<>0,0),0)
gives value 2 and then it searches for header in row 2. Thats why Reference Error
If you want only headers from row number 1 then try replace above with 1 as below. Then it will take header in case both the columns are filled or any one column is filled
try this
=IF(COUNTA($B23:$C23)=0,"",INDEX(Table2[[#Headers],[Column1]],1))

Excel: Select unique text value from column A and get corresponding value in column B

The first 2 columns repeat data in my data export dump tab. I need to get the number of positions for a unique job reference. How can I create the third column?
In C2 put the following and drag down for as many rows as required
=IF(COUNTIF($A$2:$A2,A2)>1,"",B2)

Exporting excel to csv when field on multiple rows

I have been given an excel spreadsheet to convert to csv. The problem is that one of the fields is a description field in which in sentence in the description is on a separate row. So for example the first product is on row 1. The first line of the description is on row 1, the second line of the desription is on row 2, with all the other columns in that row empty. Most products have about 6 rows of description. The next product then starts on, say row 7.
I have tried exporting the data but naturally excel creates one line in a csv file per excel line so most of the rows are empty rows with just one sentence of description (e.g. , , , "sentence 2", , )
Please can you advise if there is a way to handle this?
Thanks
One way to deal with this is to get all of the description lines into a single cell in the same row as the rest of the fields, and then get rid of the mostly-blank rows that just have the extended descriptions.
Lets assume your spreadsheet has product information in columns A and B, and the description fields in column C, like this:
In D1, enter the formula
=C1
In D2, enter the formula
=IF(A2<>"",C2,D1&"/"&C2)
Fill this down the rest of column D, producing this:
For each item, column D now contains the full description on the last row for that item. Now we're going to get that value back up into the row with the rest of the data fields for the item. In E1, enter the formula
=IF(A1<>"",OFFSET(D1,MATCH(TRUE,LEN(A2:A20)<>0,0)-1,0),"")
Hit Control-Enter to enter it as an array formula, and then fill down the rest of column E, producing this:
You need to enter one extra value after the last row (the "End" in the image above) to make this work. Now you have the full description for each item in column E. Copy column E, paste values, sort by column E to group together all the blank rows, and get rid of all the rows that don't have values in column E. You can get rid of columns C and D at this point if you want to, which leaves you with this, which you can now export to CSV:
There's a small spreadsheet that illustrates this at http://www.filedropper.com/multiline
I'd suggest to export one line per product with whole description in one place. Let's say you have a product name in column A and product descriptions in column B. You can put all descriptions in one cell with this formula (this formula assumes that you start it with cell C1):
=IF(ISBLANK(A2);B1&C2;B1)
Drag this formula till the last row, copy-paste as values (copy column C and paste it as values) and then delete "empty" (by column A) rows. Here you have one row per product with description in one place.

Excel formula to output name in first column based on a value in the 3rd column

I have a data table with 8 columns and i want to know if anyone can help me come up with a formula to get the name in the first column if i enter a value into the columns (3,4,5,6,7,8).
I want the name from the first column to appear in another table on another sheet where only names appear where data is in the columns (3,4,5,6,7 & 8)
Try this:
=IF(OR(Sheet1!C2<>"";Sheet1!D2<>"";Sheet1!E2<>"";Sheet1!F2<>"";Sheet1!G2<>"";Sheet1!H2<>"");Sheet1!A2;"")
You can use C1 = 1 .... if you prefer.
And C1,D1,E1... have to be replaced with your columns.
Also Sheet1 have to replaced with your sheet name
I would use a Pivot tables.
First create a new column in the existing table:
If you only having positive values then it is:
=sum(C2:H2)
If you have zero and negative values as well it would be like this:
=IF(COUNTBLANK(C2:H2)=6;0;1)
Then make a pivot table with the "TO/TA name" in the Row Labels and the new column in Report filter - where you then removes the "0".

Resources