Forum Discussion

NotSoFastEddie's avatar
NotSoFastEddie
Brass Contributor
May 14, 2024

How to carry the cell formatting from the source worksheet to a destination worksheet

I have defined a cell with a custom format with a value of '#0.00 " in"'.  Entering in a number value (.e.g. 1, displays a value of "1.00 in".  However, on a separate worksheet that references the source worksheet, the formatted cells do not make their way across resulting in "1" displaying in the destination worksheet.  How can I get the formatting from the original cell to carry over to the destination worksheet given a LET statement is used to generate the destination worksheet contents???


=LET(
table, PI_Package!$A$1:$HZ$1600,
head,TAKE(table,1),
data,FILTER(DROP(table,6),
(PI_Package!$A$7:$A$1600="PCODE")*(PI_Package!$C$7:$C$1600="PTY")+(PI_Package!$C$7:$C$1600="BOTH")+((PI_Package!$A$7:$A$1600="BUNDLE IDENTIFIER")*(PI_Package!$C$7:$C$1600="PTY")+(PI_Package!$C$7:$C$1600="BOTH")),"NO RECORDS"),
lang,{"en_CA";"en";"fr_CA"},
specs_heading0,TAKE(DROP(head,,176),,1),
specs_heading1,TAKE(DROP(head,,26),,14),
specs_heading2,TAKE(DROP(head,,44),,1),
specs_heading3,TAKE(DROP(head,,49),,5),
specs_heading4,TAKE(DROP(head,,183),,8),
specs_headingfr,TAKE(DROP(head,,191),,28),
specs_data0,TAKE(DROP(data,,176),,1),
specs_data1,TAKE(DROP(data,,26),,14),
specs_data2,TAKE(DROP(data,,44),,1),
specs_data3,TAKE(DROP(data,,49),,5),
specs_data4,TAKE(DROP(data,,183),,8),
specs_datafr,TAKE(DROP(data,,191),,28),
a,SEQUENCE(ROWS(lang)),
b,SEQUENCE(,ROWS(data)),
code,IF(CHOOSECOLS(data,1)="PCODE",CHOOSECOLS(data,4),CHOOSECOLS(data,5)),
VSTACK(
HSTACK("#code",specs_heading0,specs_heading1,specs_heading2,specs_heading3,specs_heading4,specs_headingfr,"Language"),
HSTACK(
CHOOSEROWS(HSTACK(code,specs_data0,specs_data1,specs_data2,specs_data3,specs_data4,specs_datafr),TOCOL(IF(a,b))),
TOCOL(IF(b,lang))
)
)
)

  • NikolinoDE's avatar
    NikolinoDE
    Gold Contributor

    NotSoFastEddie 

    Maybe with this small change.

     

    =LET(

        data, pi_pkgdata,

        recordType, PI_Package!$A$7:$A$1600,

        result, CHOOSECOLS(FILTER(data, (recordType = "PCODE"), "NO RECORDS"), 4, 158, 59, 60, 58, 42, 11, 12, 13, 14, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 15, 16, 139, 140, 17, 19, 21, 23, 25, 18, 20, 22, 24, 26, 157, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 41, 155, 156, 49, 47, 48, 46, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 43, 171, 44),

        IFBLANK(result, "")

    )

Resources