简体   繁体   中英

Import data from different columns and paste in rows using google sheet

I've this data, but my problem is to concatenate the information into lines, cause works on the way

First will the the COl A til COl D to filter where we have mismatches between A and D, but also take where on Col D has text. But I already build this part.

And do the same with the Col E til Col H.

     A       B  C   D            E      F   G   H
2020-04-30  BA  BU  fsdf    2020-04-30  G   X   
2020-04-30  BU  BA          2020-04-30  L   Z   
2020-04-29  BA  BU          2020-04-29  H   W   
2020-04-29  BU  BA          2020-04-29  G   Q   dfdf
2020-04-28  BA  BU  sdfsdfs 2020-04-28  L   W   dfdf
2020-04-28  AA  BA          2020-04-28  H   AA  
2020-04-25  AA  BA          2020-04-25  G   X   fd
2020-04-22  BU  BA  sdfsdfs 2020-04-22  L   Z   
2020-04-19  AA  BU          2020-04-19  H   W   d
2020-04-19  AA  BA          2020-04-19  G   Q   
2020-03-27  BA  AA  sdfsdf  2020-03-27  L   W   
2020-03-27  BA  AA          2020-03-27  H   AA  dfdf
2020-03-26  BU  AA          2020-03-26  G   X   
2020-03-18  BA  AA          2020-03-18  L   Z   
2020-03-18  AA  BU          2020-03-18  H   W   

My problem is cause I want to the same from Col E til Col H but pasting below the previous information. I'd like to have on this way:

2020-04-30  BA  BU  fsdf
2020-04-28  BA  BU  sdfsdfs
2020-04-22  BU  BA  sdfsdfs
2020-03-27  BA  AA  sdfsdf
2020-04-29  G   Q   dfdf
2020-04-28  L   W   dfdf
2020-04-25  G   X   fd
2020-04-19  H   W   d
2020-03-27  H   AA  dfdf

I alreaby built the script in two ways but I cound't do on a way that I can concatenate or do something like that.

=filter(importrange("xx","Database:$A,$D"),importrange("xx":"Database,$B:$B")<>importrange("xx","Database,$C:$C"),istext(importrange("xx","Database!$D:$D")))

query(importrange("xx","Database:$A,$AA50"),"SELECT Col1,Col4 WHERE (Col2<>Col3 and Col4 is not null)")

try:

=QUERY({IMPORTRANGE("xx", "Database!A:D"); 
        IMPORTRANGE("xx", "Database!E:H")},
 "select Col1,Col4 
  where Col2<>Col3 
    and Col4 is not null", 0)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM