简体   繁体   中英

How to use If statement to transfer a cell value from sheet1 to sheet 2 in Google Sheets?

I just want to know if its possible to use the IF STATEMENT in Google Sheets by such algorithm as follows;

On Sheet1, from Cell A1 , I have a value blue , and if the value inside the cell is blue , it should be transferred in Sheet2, I don't know if the syntax is correct, but it's something like this.

=if A1 VALUE(Blue) then TRANSFER to sheet2 else FALSE;

Just to interpret how should it work, but I know the code is wrong. Any help will be greatly appreciated guys.

EDIT (following OP's request )

You could use a QUERY for that. As an example

For makati1 use

Change the name of the sites to get corresponding results.

Functions used:


ORIGINAL ANSWER

This IF formula will do what you need:

You can also use:

OR

OR

Functions used:

I'm not too clear if this is the result you want, but perhaps something similar:

=QUERY(Sheet1!A1:E19,"select A, D, C, E, B where A like 'makati%'",1)

See my added sheet, Makita-GK, in your sample.

Is that doing what you want? If not, please provide more details of what you want the result to be. Note that I added some data values in your Sheet1 data. If that isn't the type of data you have, please adjust it accordingly.

If necessary, please update your question to clarify the following.

Do you mean "where D='makati'...." or "where A='makati'...."? Column D is lastname in your sample data. Also, you had no data values with makati1 or makati2 in column A?

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