Hello Again,
My second question is that I know you can use a VLookup function to bypass the limitation on the 7 If statements but here is what I am trying to do:
- If K1 = A and M1=1 then I want to perform a calculation in another cell let's just say J1: Roundup((N7/2),0)
- If K1 = A and M1=2 then J1=Roundup((N7/2)*2,0)
- If K1 = B and M1=1 then J1= a different calculation
I have about 8-10 if statements that need to do a special calculation. Now I tried creating a seperate sheet and place the individual calculations in there but it doesn't seem to work. Can anyone help me out?
You can combine if statements by using the addition symbol.
The following (nonsensical) example in which the value of a number in cell A1 is evaluated shows the idea:
You'll see that there are 8 IF statements in this piece of code but the last of them is included by using the + symbol.Code:=IF(A1=1,1,IF(A1=2,2,IF(A1=3,3,IF(A1=4,4,IF(A1=5,5,IF(A1=6,6,IF(A1=7,7)+IF(A1=8,8,"Don't know")))))))
Link may be of interest
http://www.excelforum.com/showpost.p...18&postcount=5
VBA Noob
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
oldchippy
-------------
![]()
![]()
If you are happy with the help you have received, please click the blue scales icon in the blue bar of the post.
Click here >>> Top Excel links for beginners to Experts
Forum Rules >>>Please don't forget to read these
I think these sites will help me in what I need to do...
Thank you all for your help!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks