**Question description:**

*This user has given permission to use the problem statement for this blog.*

i need a formula to fill a cell with a number value based on entries in two adjacent cells. for example, if A1='F' and B1='3', then I would like C1 to autofill with '18'

Solved by A. H. in 20 mins

This is the chat thread from the real Excelchat help session. It contains no private user information.

Excelchat Expert
02/05/2018 - 02:15

Hi there!

User
02/05/2018 - 02:15

hello

Excelchat Expert
02/05/2018 - 02:15

I will be happy to help you with your IF requirement

User
02/05/2018 - 02:15

thank you!

Excelchat Expert
02/05/2018 - 02:16

One question - what should cell C1 be if the criterias are NOT met?

User
02/05/2018 - 02:16

blank is fine

Excelchat Expert
02/05/2018 - 02:17

Ok great

Excelchat Expert
02/05/2018 - 02:18

Check out the formula in cell C1 and let me know if that works for you!

User
02/05/2018 - 02:19

ok, that did work for me

User
02/05/2018 - 02:19

so, i have some new questions now!

User
02/05/2018 - 02:20

is there a way to input multiple 'IF' conditions into the same cell?

Excelchat Expert
02/05/2018 - 02:20

Ok awesome! The thing is... we are only supposed to answer one question per session.

Excelchat Expert
02/05/2018 - 02:20

can answer that one though!

Excelchat Expert
02/05/2018 - 02:20

I

User
02/05/2018 - 02:20

also, I would like the whole column to behave this way

User
02/05/2018 - 02:21

wow yea, that is like the genie's 3 wishes rule

Excelchat Expert
02/05/2018 - 02:21

Absolutely. Give me an example of a multiple IF logic that you would need and I can code it so you can see

Excelchat Expert
02/05/2018 - 02:21

Regarding the whole column to behave this way - you can just drag down the formula (hover mouse over bottom right of cell, until you see the "+" sign, then grab and drag it down)

User
02/05/2018 - 02:22

for instance, if B1=4 instead, then I would like C1=26

User
02/05/2018 - 02:23

ok, thank you, i should have figured about that handle

Excelchat Expert
02/05/2018 - 02:24

oh yes

Excelchat Expert
02/05/2018 - 02:24

let me code that in for you so you can see how to use multiple IF's

User
02/05/2018 - 02:24

okay, thanks!

Excelchat Expert
02/05/2018 - 02:24

You have to use the AND in there as well

Excelchat Expert
02/05/2018 - 02:25

See how I just added the next IF?

User
02/05/2018 - 02:26

don't see that yet...

User
02/05/2018 - 02:26

only see the one IF

User
02/05/2018 - 02:26

i see the AND

User
02/05/2018 - 02:26

=if(and(A1="F",B1=3),18,"")

Excelchat Expert
02/05/2018 - 02:26

Weird!

Excelchat Expert
02/05/2018 - 02:26

=if(and(A1="F",B1=3),18,if(and(A1="F",B1=4),26,""))

Excelchat Expert
02/05/2018 - 02:27

Sometimes the google sheet acts up like this.

User
02/05/2018 - 02:27

ok, no worries. i think i understand the logic

Excelchat Expert
02/05/2018 - 02:27

Beautiful

Excelchat Expert
02/05/2018 - 02:28

Please don't hesitate to ping us back though if you need more help and we can assist with a new session. I hope I added some value!

User
02/05/2018 - 02:28

last clarifying question! if i were to change the position of one of the columns, will the formula still work or should manually input new column entries?

Excelchat Expert
02/05/2018 - 02:28

Oh good one

Excelchat Expert
02/05/2018 - 02:28

Depending on which column you change... you may have to adjust the formula slightly

User
02/05/2018 - 02:28

ok, if it doesn't work then i'll know it didn't automatically change the values

Excelchat Expert
02/05/2018 - 02:28

like if you put the letters in column D instead... A1 would be replaced with D1

Excelchat Expert
02/05/2018 - 02:29

give me an example and I will tell you how it would affect the formula

User
02/05/2018 - 02:30

let's say i cut the C column and inserted it after G, would the formula automatically update its parameters?

Excelchat Expert
02/05/2018 - 02:31

The formula would have to be adjusted, you would just make the cell refrences back to A and B

Excelchat Expert
02/05/2018 - 02:31

there is a way to make them static... but then the auto populating of the column doesn't work

User
02/05/2018 - 02:31

ok, then i would make the change in the row 1 and drag the handle back down to update all

User
02/05/2018 - 02:31

sounds good!

Excelchat Expert
02/05/2018 - 02:32

Yes exactly to the first cell!

Excelchat Expert
02/05/2018 - 02:32

then drag

Excelchat Expert
02/05/2018 - 02:32

Reach back out if you have issues and we will help!

User
02/05/2018 - 02:32

thank you so much, you've been super helpful

Excelchat Expert
02/05/2018 - 02:32

That's great news - thanks!

Excelchat Expert
02/05/2018 - 02:32

have a great day ~

User
02/05/2018 - 02:32

you too!

Excelchat Expert
02/05/2018 - 02:33

:)

**This is the output file from the real Excelchat help session:**

*This is an example of the expert help you can get. It contains no private user information.*