Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Urgent help with nestled condition is needed

Hi, please help me with this

1) check if D6/100 1,5

2) if 1 true: check if D6/100 < 25

3) if 2 false: check D6/2501,5

4) if 3 true: check D6/250<25

5) if 4 false check D6/500 1,5

6) if 1 false: then B30= "can't use"

7) if 2 true: B16 = 100

8) B30 =(B16*60/((B2*F2)/(1*F2)))

9) If 4 true: B16 = 250

10) B30 =(B16*60/((B2*F2)/(1*F2))

11) If 5 true: B16=500

12) B30 =(B16*60/((B2*F2)/(1*F2))



Any help weŽll be appreciated

/Peter
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Urgent help with nestled condition is needed

Most of this question was answered the first time you asked it although you
don't show an upper constraint for 500 this time.


=if(and(D6/1001.5,D6/100<25),100,if(And(D6/2501.5,D6/250<25),250,if(D6/250
1.5,500,"can't use")))


=if(isnumber(B16),(B16*60/((B2*F2)/(1*F2)),"can't use")


--
Regards,
Tom Ogilvy


"farsta_online" wrote in message
om...
Hi, please help me with this

1) check if D6/100 1,5

2) if 1 true: check if D6/100 < 25

3) if 2 false: check D6/2501,5

4) if 3 true: check D6/250<25

5) if 4 false check D6/500 1,5

6) if 1 false: then B30= "can't use"

7) if 2 true: B16 = 100

8) B30 =(B16*60/((B2*F2)/(1*F2)))

9) If 4 true: B16 = 250

10) B30 =(B16*60/((B2*F2)/(1*F2))

11) If 5 true: B16=500

12) B30 =(B16*60/((B2*F2)/(1*F2))



Any help weŽll be appreciated

/Peter



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default Urgent help with nestled condition is needed

I like a challenge, so I'll give it a go:

TestVar1 = (Range("D6").Value/100)
TestVar2 = (Range("D6").Value/250)
TestVar3 = (Range("D6").Value/500)

If TestVar1 1,5 Then
If TestVar1 < 25 Then
Range("B16").Value = 100
Else
If TestVar2 1,5 Then
If TestVar2 < 25 Then
Range("B16").Value = 250
Else
If TestVar3 1,5 Then
Range("B16").Value = 500
End If
End If
End If
End If
Range("B30") = (Range("B16") * 60 / _
((Range("B2") * Range("F2")) / (1 * Range("F2"))))
Else
Range("B30").Value = "can't use"
End If

YIKES! Hope I got it...

-----Original Message-----
Hi, please help me with this

1) check if D6/100 1,5

2) if 1 true: check if D6/100 < 25

3) if 2 false: check D6/2501,5

4) if 3 true: check D6/250<25

5) if 4 false check D6/500 1,5

6) if 1 false: then B30= "can't use"

7) if 2 true: B16 = 100

8) B30 =(B16*60/((B2*F2)/(1*F2)))

9) If 4 true: B16 = 250

10) B30 =(B16*60/((B2*F2)/(1*F2))

11) If 5 true: B16=500

12) B30 =(B16*60/((B2*F2)/(1*F2))



Any help weŽll be appreciated

/Peter
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Urgent help with nestled condition is needed



Tom,
you wrote: "Most of this question was answered the first time you
asked....."
Yes but the excel (as I wrote in my answer) didnŽt accepted your
suggestion
/Peter

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Urgent help with nestled condition is needed

The formula works fine in Excel for me - and I see no post in that thread
where you responded at all. You should stay in a thread once you start
one.

--
Regards,
Tom Ogilvy

"Peter L" wrote in message
...


Tom,
you wrote: "Most of this question was answered the first time you
asked....."
Yes but the excel (as I wrote in my answer) didnŽt accepted your
suggestion
/Peter

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Urgent help with nestled condition is needed



Tom, Iknow that I should stay in tread - but thanks anyway
/Peter

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Urgent help with nestled condition is needed

Why "thanks anyway" - the formula provided represents the situation you
described. It is taken from an excel cell (B16) where it is working very
well. If it doesn't work for you, did you change 1.5 to 1,5 so it matches
your regional settings?

--
Regards,
Tom Ogilvy

"Peter L" wrote in message
...


Tom, Iknow that I should stay in tread - but thanks anyway
/Peter

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Urgent help with nestled condition is needed



Sorry Tom for my bad english - It wasnŽt my meaning to affend you, IŽm
very grateful for you help and support.

Anf yes I tried with both 1.5 and 1,5...
Can my truble depends on that my excel is "swedish speeking" and your
formula is in english?
/Peter

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Urgent help with nestled condition is needed

You would have to change IF and AND to the swedish equivalent.

You can try this

Sub MakeFormula()
Dim sForm as String
sForm = "=if(And(D6/1001.5,D6/100<25),100,if(And" & _
"(D6/2501.5,D6/250<25),250,if(D6/250" & _
"1.5,500,""can't use"")))"
Range("B16").Formula = sForm
End Sub

Paste that into a general module and run it.

It should put in a formula in B16 of the active sheet that your excel can
work with. You don't need to make any changes to the above - VBA should
work with the English version of the formula.

--
Regards,
Tom Ogilvy


"Peter L" wrote in message
...


Sorry Tom for my bad english - It wasnŽt my meaning to affend you, IŽm
very grateful for you help and support.

Anf yes I tried with both 1.5 and 1,5...
Can my truble depends on that my excel is "swedish speeking" and your
formula is in english?
/Peter

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Urgent help with nestled condition is needed



Tom (and others who are reading this tread):
the problem was that "my excel" wantŽs ";" instead of ","

Thanks for al your help
/Peter

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
URGENT HELP NEEDED ah Excel Discussion (Misc queries) 4 August 22nd 08 08:05 AM
sumif with 3 condition - urgent RKS Excel Discussion (Misc queries) 22 March 29th 08 12:02 PM
Urgent help needed Excel Helps Excel Worksheet Functions 13 January 21st 08 03:50 PM
Help Needed Urgent BiggieD Excel Discussion (Misc queries) 7 April 19th 06 05:04 PM
Urgent Help needed Brento Excel Discussion (Misc queries) 0 February 9th 06 09:10 PM


All times are GMT +1. The time now is 12:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"