Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Help needed to Create Formulae

Hello!,


I have the following in sheet1

Range D4 and Range E4 have validation list.

Range D4 picks the value from a list which is formatted as text and can
have *,1, 2, 3, 100, 101 thru 400.

Range D4 can have *, G, N

I have a formula in say G4 based on the value in D4 and E4.

I want to apply the following conditions.


If D4 = "*" And E4 = "*" Then
Formula 1
If D4 = "*" And E4 = 1 Or E4 = 2 Or E4 = 3 Then
Formula 2
If D4 = "*" And E4 < 1 Or E4 < 2 Or E4 < 3 Or E4 < "*" Then
Formula 3
If D4 < "*" And E4 = "*" Then
Formula 4
If D4 < "*" And E4 = 1 Or E4 = 2 Or E4 = 3 Then
Formula 5
If D4 < "*" And E4 < 1 Or E4 < 2 Or E4 < 3 Or E4 < "*" Then
Formula 6

When I used if .. Elseif ..Endif my formula do not work!

Ho can I make this using VBA?

Is ther any conflict in my conditions there?

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Help needed to Create Formulae

If d4 = "*" Then
If b4 = "*" Then
Formula 1
ElseIf b4 = 1 Or b4 = 2 Or b4 = 3 Then
Formula 2
Else
Formula 3
End If
Else
If b4 = "*" Then
Formula 4
ElseIf b4 = 1 Or b4 = 2 Or b4 = 3 Then
Formula 5
Else
Formula 6
End If

End If

Cordialement,
--
AP

a écrit dans le message de
ups.com...
Hello!,


I have the following in sheet1

Range D4 and Range E4 have validation list.

Range D4 picks the value from a list which is formatted as text and can
have *,1, 2, 3, 100, 101 thru 400.

Range D4 can have *, G, N

I have a formula in say G4 based on the value in D4 and E4.

I want to apply the following conditions.


If D4 = "*" And E4 = "*" Then
Formula 1
If D4 = "*" And E4 = 1 Or E4 = 2 Or E4 = 3 Then
Formula 2
If D4 = "*" And E4 < 1 Or E4 < 2 Or E4 < 3 Or E4 < "*" Then
Formula 3
If D4 < "*" And E4 = "*" Then
Formula 4
If D4 < "*" And E4 = 1 Or E4 = 2 Or E4 = 3 Then
Formula 5
If D4 < "*" And E4 < 1 Or E4 < 2 Or E4 < 3 Or E4 < "*" Then
Formula 6

When I used if .. Elseif ..Endif my formula do not work!

Ho can I make this using VBA?

Is ther any conflict in my conditions there?

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Help needed to Create Formulae

Try using Case

Case D4 = "*" And E4 = "*"
Formula 1
Case D4 = "*" And E4 = 1 Or E4 = 2 Or E4 = 3
Formula 2
Case D4 = "*" And E4 < 1 Or E4 < 2 Or E4 < 3 Or E4 < "*"
Formula 3
Case D4 < "*" And E4 = "*"
Formula 4
Case D4 < "*" And E4 = 1 Or E4 = 2 Or E4 = 3
Formula 5
Case D4 < "*" And E4 < 1 Or E4 < 2 Or E4 < 3 Or E4 < "*"
Formula 6
End Case

This will also work if you put it in G4 and fill down

=IF(AND($D4="*",$E4="*"),"Formula1",IF(AND($D4="*" ,$E4<4,$E4<"*"),"Formula2",IF(AND($D4="*",$E44,) ,"Formula3",IF(AND($D4="*",$E41),"Formula4",IF(AN D($D4="G",$E4<=3),"Formula5",IF(AND($D4<"*",$E4< "*",$E43),"Formula6"))))))

Glen

wrote in message
ups.com...
Hello!,


I have the following in sheet1

Range D4 and Range E4 have validation list.

Range D4 picks the value from a list which is formatted as text and can
have *,1, 2, 3, 100, 101 thru 400.

Range D4 can have *, G, N

I have a formula in say G4 based on the value in D4 and E4.

I want to apply the following conditions.


If D4 = "*" And E4 = "*" Then
Formula 1
If D4 = "*" And E4 = 1 Or E4 = 2 Or E4 = 3 Then
Formula 2
If D4 = "*" And E4 < 1 Or E4 < 2 Or E4 < 3 Or E4 < "*" Then
Formula 3
If D4 < "*" And E4 = "*" Then
Formula 4
If D4 < "*" And E4 = 1 Or E4 = 2 Or E4 = 3 Then
Formula 5
If D4 < "*" And E4 < 1 Or E4 < 2 Or E4 < 3 Or E4 < "*" Then
Formula 6

When I used if .. Elseif ..Endif my formula do not work!

Ho can I make this using VBA?

Is ther any conflict in my conditions there?

Thanks





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
Help to create a formulae FredDave Excel Worksheet Functions 1 March 16th 10 01:33 PM
Formulae needed Graham Excel Discussion (Misc queries) 1 February 8th 10 01:02 PM
Formulae needed Graham New Users to Excel 1 April 8th 09 01:29 PM
students grades, formulae to calculate what grade is needed based. mjreisbord Excel Worksheet Functions 3 September 4th 05 10:00 PM
Help needed to create a formula pls!!! Mark[_44_] Excel Programming 1 May 20th 04 06:33 PM


All times are GMT +1. The time now is 09:45 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"