如何在工作表中的列之间映射值

How to map values between columns in worksheets

I have the following worksheets

SPEARDSHEET FILE A https://docs.google.com/spreadsheets/d/153trbK2CvrUbEiIF2YZlAhskBq4MqQCckxAxutPOnEQ/edit?usp=sharing.

SPREADSHEET FILE B

https://docs.google.com/spreadsheets/d/1jjZEXSnskjiuZQdWYqnZGn4jwZS-6RUoY8sGacZq-88/edit?usp=sharing

I want to populate the WORKSHEET B with values from WORKSHEET A that corresponding Month. Note that months with 0 values are omited thus in WORKSHEET A there is no Month 5 or Month 10 by design.

How can I map the values between WORKSHEET B and A?

UPDATE

This is the closest I've come to it which imports the rows form WORKSHEET A into WORKSHEET B and tries to match the columns with the month and then return the values. but does not map it to the appropriate column

=ARRAYFORMULA(HLOOKUP(MATCH(INDEX(ARRAYFORMULA(IMPORTRANGE("153trbK2CvrUbEiIF2YZlAhskBq4MqQCckxAxutPOnEQ","Cash Flow!A1:H3"))),A1:L3),A2:L3,2))

A simple INDEX/MATCH will do:

=IFERROR(INDEX('Cash Flow'!2:2,MATCH(A$1,'Cash Flow'!1:1,0)),0)

Put it in the first cell and copy over.

enter image description here

enter image description here

Note if your sheets are in different files replace 'Cash Flow'!2:2 and 'Cash Flow'!1:1 with:

IMPORTRANGE("YourURLString","'Cash Flow'!2:2")

and

IMPORTRANGE("YourURLString","'Cash Flow'!1:1")

respectively

Actual formula:

=iferror(index(IMPORTRANGE("https://docs.google.com/spreadsheets/d/153trbK2CvrUbEiIF2YZlAhskBq4MqQCckxAxutPOnEQ/edit?usp=sharing","'Cash Flow'!3:3"),match(A$1,IMPORTRANGE("https://docs.google.com/spreadsheets/d/153trbK2CvrUbEiIF2YZlAhskBq4MqQCckxAxutPOnEQ/edit?usp=sharing","'Cash Flow'!2:2"),0)),0)

enter image description here


BTW: HLOOKUP would do the work also:

=IFERROR(HLOOKUP(A$1,'Cash Flow'!$1:$2,2,FALSE),0)

enter image description here

enter image description here

NOTE if your sheets are in different files replace the 'Cash Flow'!$1:$2 with:

IMPORTRANGE("YourURLString","'Cash Flow'!1:2")

Now that you have shared the sheet:

=IFERROR(HLOOKUP(A$1,IMPORTRANGE("https://docs.google.com/spreadsheets/d/153trbK2CvrUbEiIF2YZlAhskBq4MqQCckxAxutPOnEQ/edit?usp=sharing","'Cash Flow'!2:3"),2,FALSE),0)

enter image description here


Another Option; SUMIF()

=SUMIF('Cash Flow'!1:1,A$1,'Cash Flow'!2:2)

enter image description here

enter image description here

This does not work cross files in google sheets.


My Cash Flows for reference:

enter image description here

They work on separate sheets, not separate files but different sheets in the same fill, they do.
IDK, I am not a mind reader. :) If the OP wanted different sheets in different files, then they should have said so. Maybe the OP does not understand the use of IMPORTRANGE and is over thinking it. Maybe... We shall see.
@ScottCraner I am intact referring to separate files and not sheets. I think I have the terminology wrong? should I refer to files as spreadsheet and the sheets as worksheet?
@Kendall see edit for notes on how to use the first two with separate files.
@pnuts see edit. I included a note how to use the first two with reference to another file.

MS Excell has a function called HLOOKUP which may do what you need. I left an example for you here: https://d.docs.live.net/8af110ba68997b6e/Documents/HlookupExample.xlsx

There's an explanation here: https://support.office.com/en-us/article/HLOOKUP-function-a3034eec-b719-4ba3-bb65-e1ad662ed95f

Try to download the example from here: dropbox.com/s/6csh1v6v0mhex21/HlookupExample.xlsx?dl=0
Could not see your example. The HLOOKUP is cool but does not map the values appropriately
@Kendall then you are using it improperly, or your desire and explanation are lacking.