If H10 is blank= 0
if H10 contains “mini” but H11 is blank =400
If H10 contains “mini” and H11 contains “split” = 200
If H10 is blank= 0
if H10 contains “mini” but H11 is blank =400
If H10 contains “mini” and H11 contains “split” = 200
Last edited by JMarie77; 05-10-2013 at 01:21 PM.
Hi and welcome to the forum
We would love to help you with your question, but 1st, in accordance with forum rules, please rename your thread to something more meaningful, that actually describes your problem.
Because thread titles are used in searching the forum it is vital they be written to accurately describe your thread content or overall objective using ONLY search friendly key words. That is, your title used as search terms would return relevant results.
Many members will look at a thread title, and if it is of interest to them, or it falls within their area of expertise, they might only open those threads.
Look at it this way...if you typed that title into google, what would you expect to get back?
To change a Title on your post, click EDIT on you're 1st post, then Go Advanced and change your title
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Thank you for the tip.
Thanks
If H10 is blank= 0
if H10 contains “mini” but H11 is blank =400
If H10 contains “mini” and H11 contains “split” = 200
=IF(H10="",0,IF(AND(H10="mini",H11=""),400,IF(AND(H10="mini",H11="split"),200)))
Sorry, it's returning 0, not 400
ok, sorry, there were some cell numbers that needed to be changed, as it wasn't h10 / h11, but h10 and i10. that was my bad. your formula worked perfectly, after I tweaked my own bad info. You're the best and saved my day. THANK YOU SOOOO MUCH!!!!!
FDibbins,
Thank you for your help, however, I plugged that in and it's returning 400 for me no matter what.
J
To attach a file to your post,
click advanced (next to quick post),
scroll down until you see "manage file",
click that and select "add files" (top right corner).
click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"
Once the upload is completed the file name will appear below the input boxes in this window.
You can then close the window to return to the new post screen.
Happy to help![]()
Personally, I find IF statements which are nested > 2 level to be hard to code, to understand, to debug, and to maintain. May I suggest a macro?
seems to work. In the calling cell, put "=MiniSplit(H10, H11)"![]()
Public Function MiniSplit(C1 As Range, C2 As Range) As Long If C1.Value = "" Then MiniSplit = 0 ElseIf C1.Value = "mini" And C2.Value = "split" Then MiniSplit = 400 ElseIf C1.Value = "mini" And C2.Value = "" Then MiniSplit = 200 Else MiniSplit = -1 End If End Function
I've understood you to mean that H10 either holds "mini" or is blank. If you are trying to pattern-match (e.g if H10 holds "minimum") or are not wanting to be case sensitive, then you can tell us that.
You might get cleaner code using a SELECT statement instead of IF/ELSEIF, depending on what all you're trying to do.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks