I have an exported sheet of order line items and that has a master order number in column A but the order data is only completely filled on the first line item.
The blank cells are creating an issue when I try to work with the data.
What is the best way to fill out the blank cells with the data from the first line item?
I've tried to merge rows but I am only trying to merge if the cells are empty and of the same order number.
I came up with an idea:
=if($A3=$A2,if(ISBLANK(C2),"",C2),"FALSE")
Then filter by blank cells and copy and paste.
Is this the best way?
Input:
Name | Shipping Method | Lineitem quantity | Lineitem price | Lineitem sku | Shipping Address1 | Shipping Address2 | Shipping City | Shipping Zip | Shipping Province | |
---|---|---|---|---|---|---|---|---|---|---|
985292 | [email protected] | Expedited Plus Shipping (3-4 days) | 1 | 0 | XXXXSKU | XXXXXX Avenue | Apt #220 | Venice | 90291 | CA |
985292 | [email protected] | 1 | 24.95 | XXXXLO01 | ||||||
985292 | [email protected] | 2 | 44.95 | PRO20LL | ||||||
985285 | [email protected] | Expedited Plus Shipping (3-4 days) | 1 | 85.4 | PRO20LL02 | XXXXXX Ave | Norwell | 2889 | RI | |
985288 | [email protected] | Priority Shipping (2-3 days) | 1 | 44.95 | PRO20LL | XXXXXX Parkway | Minneapolis | 55408 | MA | |
985287 | [email protected] | Priority Shipping (2-3 days) | 1 | 44.95 | PRO20LL | XXX Street | Apt #4 | Minneapolis | 55102 | MN |
985250 | [email protected] | Expedited Plus Shipping (3-4 days) | 1 | 35.96 | XXXXX-01 | XXXXX Road | Norwell | 2061 | MA | |
985250 | [email protected] | 1 | 40.46 | PRO20LL | ||||||
985250 | [email protected] | 1 | 35.96 | XXXX_SK01 |
Ideal output:
Name | Shipping Method | Lineitem quantity | Lineitem price | Lineitem sku | Shipping Address1 | Shipping Address2 | Shipping City | Shipping Zip | Shipping Province | |
---|---|---|---|---|---|---|---|---|---|---|
985292 | [email protected] | Expedited Plus Shipping (3-4 days) | 1 | 0 | XXXXSKU | XXXXXX Avenue | Apt #220 | Venice | 90291 | CA |
985292 | [email protected] | Expedited Plus Shipping (3-4 days) | 1 | 24.95 | XXXXLO01 | XXXXXX Avenue | Apt #220 | Venice | 90291 | CA |
985292 | [email protected] | Expedited Plus Shipping (3-4 days) | 2 | 44.95 | PRO20LL | XXXXXX Avenue | Apt #220 | Venice | 90291 | CA |
985285 | [email protected] | Expedited Plus Shipping (3-4 days) | 1 | 85.4 | PRO20LL02 | XXXXXX Ave | Norwell | 2889 | RI | |
985288 | [email protected] | Priority Shipping (2-3 days) | 1 | 44.95 | PRO20LL | XXXXXX Parkway | Minneapolis | 55408 | MA | |
985287 | [email protected] | Priority Shipping (2-3 days) | 1 | 44.95 | PRO20LL | XXX Street | Apt #4 | Minneapolis | 55102 | MN |
985250 | [email protected] | Expedited Plus Shipping (3-4 days) | 1 | 35.96 | XXXXX-01 | XXXXX Road | Norwell | 2061 | MA | |
985250 | [email protected] | Expedited Plus Shipping (3-4 days) | 1 | 40.46 | PRO20LL | XXXXX Road | Norwell | 2061 | MA | |
985250 | [email protected] | Expedited Plus Shipping (3-4 days) | 1 | 35.96 | XXXX_SK01 | XXXXX Road | Norwell | 2061 | MA |
SCAN
. Using SCAN
, iterate through each Name
(col A) and to get a comparator function to compare each item(c
) to the previous accumulated one(a
)SCAN
using OFFSET
to the entire 10 columns(ce
)Name
with the a
ccumulator's Name
and if c
urrent value is empty, put the a
ccumulator, else the extended current value ce
Assuming the table is in A1:K10, in A15,
=SCAN(
A1,A2:A10,
LAMBDA(a,c,
LET(
cols,10,
ce,OFFSET(c,0,0,1,cols),
ARRAYFORMULA(
IF(
(ce="")*((c=INDEX(a,1,1))),a,ce
)
)
)
)
)