Forum Discussion

Pageserv's avatar
Pageserv
Copper Contributor
Feb 28, 2023

Worksheet data import

I have developed a worksheet for creating a spread of banking activity using many formulas. I would like to reuse the sheet by clearing data only, and importing data from a new downloaded sheet by using matching column headings and/or column positions. I have tried using copy with paste special to copy just the data, but because the column sizes of the source and target sheets are different, I get an error message saying the selected area I am attempting to copy does not match the target area. Is there a way to copy the data that will use either the column positions or the column headings without requiring that the column sizes are an exact match?

  • Pageserv 

    =IFERROR(IF(INDEX(Tabelle1!$A$2:$H$19,ROW($I1),MATCH(Tabelle2!A$1,Tabelle1!$A$1:$H$1,0))="","",INDEX(Tabelle1!$A$2:$H$19,ROW($I1),MATCH(Tabelle2!A$1,Tabelle1!$A$1:$H$1,0))),"")

    You can try this formula. The headers are arranged in a different order in the original sheet and in the result sheet with the formula.

    • Pageserv's avatar
      Pageserv
      Copper Contributor

      OliverScheurich 

      Thank you for the response!

      I have used excel for many years, but I am not an expert.

      I am not sure how you would use your formula for my purpose. Would you copy that formula into each cell that you want to copy over?

      • OliverScheurich's avatar
        OliverScheurich
        Gold Contributor

        Pageserv 

        My assumption is that the new downloaded data is in sheet1 where the headers are sorted in ascending order header1, header2, header3 and so on. In sheet2 the formula is entered in cell A2 and filled across range A2:H19 with the fill handle. The formula can be filled down and across larger ranges as required. In other words i would copy that formula into each cell that i want to copy over by using the fill handle and not by selecting each cell and copying the formula into each cell separately.

         

Resources