if help

Peter1973

Well-known Member
Joined
May 13, 2006
Messages
963
Office Version
  1. 365
Hi I am trying to get an if to work but cant get it.

I need to look in A1 and if the value is less than 46 return B1+356 if A1 is greater than 46 but less than 60 return B1+712 and if A1 is greater than 60 return B1+1000.


Any help appreciated
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
VBA Solution:

Code:
Function kpark91()
If Range("A1").Value < 46 Then
    kpark91 = Range("B1").Value + 356
ElseIf Range("A1").Value < 60 Then
    kpark91 = Range("B1").Value + 712
Else
    kpark91 = Range("B1").Value + 1000
End If
End Function

Edit: LOL. I was dealing with VBA so much that I totally forgot that you were asking for a formula...
 
Upvote 0
VoG I have used yours and amended it to :

=IF(F2<46,G2+1095,IF(F2>60,G2+365,G2+730))

However in F2 I have the following formula =NOW()-E2 which is preventing it form working any ideas?
 
Upvote 0
No its a number to calculate the persons age but it returns the same result no matter what the value in F2 is
 
Upvote 0
NOW() is approximately 40675. You would have to subtract a pretty big number to get within the limits of the formula.
 
Upvote 0
Did you try Sektor's formula? That's the same one I came up with (except I used commas not semi colons). Depending on what result you're looking for, it worked for me.
 
Last edited:
Upvote 0
Is there a way around this F2 contains the persons age so is calculated from their DOB?
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,152
Members
452,891
Latest member
JUSTOUTOFMYREACH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top