Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I set up a greater than but less than formula in excel?

I am tring to sort data to look at one of three tables. Once it finds the
right table, then it produces a value based on the table. I can get the ones
to work for <50000 and 100000, but I am having trouble establishing the
criteria for the 499999 but 100000.

Here are my tables:
0-$49999 $50,000-$99,999 $100,000 and
over

0.000% 9.999% 0.05 0.000% 9.999% 0.05 0.000% 9.999% 0.05
10.000% 19.990% 0.04 10.000% 19.990% 0.04 10.000% 19.990% 0.04
20.000% 29.990% 0.03 20.000% 29.990% 0.03 20.000% 29.990% 0.03
30.000% 39.990% 0.02 30.000% 39.990% 0.02 30.000% 39.990% 0.02
40.000% 49.990% 0.01 40.000% 49.990% 0.01 40.000% 49.990% 0.01
50.000% 59.990% 0 50.000% 59.990% 0 50.000% 59.990% 0
60.000% 69.990% -0.02 60.000% 69.990%-0.02 60.000% 69.990% -0.02
70.000% 79.990% -0.03 70.000% 79.990%-0.035 70.000% 79.990% -0.04
80.000% 89.990% -0.04 80.000% 89.990% -0.05 80.000% 89.990% -0.06
90.000% 99.990% -0.05 90.000% 99.990%-0.065 90.000% 99.990% -0.08
100.000% -0.06 100.000% -0.08 100.000% -0.1

Therefore, excel needs to look for a value to find the correct table, and
then needs to look at another number to determine the correct result. I am
not sure how to write If (cell ) is 49999<100000. This obviously did not
work. Do I need to break it out into 2 sentences? Any ideas?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I set up a greater than but less than formula in excel?


To code:

If ActiveCell 49999 And ActiveCell < 100000 Then
MsgBox "Yes"
Else
MsgBox "No"
End If

For a formula:
=IF(AND(A149999,A1<100000),"Yes","No")


--
Ikaabod
------------------------------------------------------------------------
Ikaabod's Profile: http://www.excelforum.com/member.php...o&userid=33371
View this thread: http://www.excelforum.com/showthread...hreadid=545513

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 290
Default How do I set up a greater than but less than formula in excel?



=SUM(IF(B2=49999,IF(B2<=100000,0),0))


assuming B2 is the cell, when you put this into whatever cell you want
the answer in, click on the text and do control+shift+enter and this
will put curly brackets around the sum to make it work. you can add
more 'IF's in to sum based on more criteria (like your tables)
following the same pattern as above.

HTH

Duncan

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
If formula: if A1 is greater than B1 and A1 is greater than zero.. Jason Excel Discussion (Misc queries) 2 April 5th 10 06:11 PM
Excel less than greater than formula Mandy Excel Discussion (Misc queries) 1 September 8th 08 04:21 PM
Greater than Less than formula Mike Excel Discussion (Misc queries) 2 May 20th 08 01:51 PM
Greater than Less than formula Help with Check Mark!! Excel Discussion (Misc queries) 3 August 22nd 06 07:05 PM
Formula in Excel to show greater than 50, but less than 250? Janice B. - Cleveland, Ohio Excel Worksheet Functions 3 July 10th 06 10:07 PM


All times are GMT +1. The time now is 05:31 PM.

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

About Us

"It's about Microsoft Excel"