# Excel - IF Function Problem - Expert Solution

Question description:
This user has given permission to use the problem statement for this blog.

I need help with IF Formulas. Example. IF A2(4) is less than B2(5), I need cell C2 to read A2's number. In the same formula I need to have the option that if B2 is less than A2, that C2 needs to read B2 number.
Solved by V. J. in 17 mins
This is the chat thread from the real Excelchat help session. It contains no private user information.
Excelchat Expert 01/05/2018 - 09:40
Hello!
Excelchat Expert 01/05/2018 - 09:40
how are you?
User 01/05/2018 - 09:40
I'm well how are you.
Excelchat Expert 01/05/2018 - 09:40
I'm good, thanks
Excelchat Expert 01/05/2018 - 09:40
by the way do you have a sample data we could work with?
User 01/05/2018 - 09:41
I could type some into this google sheet now
Excelchat Expert 01/05/2018 - 09:41
Thanks :)
Excelchat Expert 01/05/2018 - 09:42
I can present you with two options, use, MIN() or IF() formula
Excelchat Expert 01/05/2018 - 09:43
MIN() is the shortest one
User 01/05/2018 - 09:43
Yeah I was trying the IF formula and was totally lost.
Excelchat Expert 01/05/2018 - 09:44
Are you able to see formula in columns C and D?
User 01/05/2018 - 09:44
Yes thank you.
User 01/05/2018 - 09:44
one more question
Excelchat Expert 01/05/2018 - 09:45
MIN() basically picks up the smallest number in a defined range, IF(A<B,A,B) means that if A is less than B, then pick A, otherwise pick B
Excelchat Expert 01/05/2018 - 09:46
sure, as long as it is of the same nature with your original problem as we are limited to one scope of problem per session :)
User 01/05/2018 - 09:47
If I want the value of A22 to be used in the values of B22 through J22 by referencing B21 through J21. So if the originial number in B22 is 4, but since the number in A22 is less than B21, I'd like the number to change from 4 to 3. Does that make sense?
Excelchat Expert 01/05/2018 - 09:49
How did you get to 3 from 4?
User 01/05/2018 - 09:49
Because 7 is greater than 1, and since that happens, it needs to decrease 4 to 3.
Excelchat Expert 01/05/2018 - 09:50
so 4 minus 1?
Excelchat Expert 01/05/2018 - 09:50
same goes for column C, 5 minus 2, and so on?
User 01/05/2018 - 09:50
Yes, but only because 7 is greater than 1. Like this doesn't need to happen to cells I22 and J22.
Excelchat Expert 01/05/2018 - 09:53
Are you able to see values in row 23?
User 01/05/2018 - 09:53
Yes I'm looking now.
User 01/05/2018 - 09:53
What does the \$ represent?
User 01/05/2018 - 09:53
for future reference
Excelchat Expert 01/05/2018 - 09:53
it means fixed reference to column A
Excelchat Expert 01/05/2018 - 09:54
that is useful when you want to copy and paste formula across several cells
Excelchat Expert 01/05/2018 - 09:55
\$A1 means, fix to column A, A\$1 means to fix in row 1, \$A\$1 means to fix in cell A1
User 01/05/2018 - 09:55
Oh okay that makes sense.
User 01/05/2018 - 09:56
Thank you for all your help.
Excelchat Expert 01/05/2018 - 09:56
You are most welcome!
Excelchat Expert 01/05/2018 - 09:56
do you have any more clarifications?
User 01/05/2018 - 09:56
Not at all thank you.
Excelchat Expert 01/05/2018 - 09:56
If you don't have any more clarifications at this point, you may end the session by hovering over the TIME REMAINING section of this chat window and select END SESSION
Excelchat Expert 01/05/2018 - 09:57
Also, your kind feedback and rating will be highly appreciated! Thanks!

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.

Get instant expert help with Excel and Google Sheets

#### Post your problem and you’ll get expert help in seconds.

Your message must be at least 40 characters
Your privacy is guaranteed. Your session will not be used for blog unless you give us persmission.