Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default STILL DESPERATE FOR HELP!!!

I hope this is not confusing but what is displayed as the final rating for A2
depends on if it falls between the values in B2 and C2 or B3 and C3
respectively

for instance

A2 = 10

B2 = 5
C2 = 20
D2 = 7

So since A2 falls between B2 and C2 the rating for A2 would equal 7 because
that is the respective rating.

but if A2 = 50

B3 = 21
C3 = 55
D3 = 12

then the rating for A2 would be 12 since it falls between B3 and C3.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default STILL DESPERATE FOR HELP!!!

Try this:

=SUMPRODUCT((A2=B2:B3)*(A2<=C2:C3)*D2:D3)

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"edm1007" wrote in message
...
I hope this is not confusing but what is displayed as the final rating for

A2
depends on if it falls between the values in B2 and C2 or B3 and C3
respectively

for instance

A2 = 10

B2 = 5
C2 = 20
D2 = 7

So since A2 falls between B2 and C2 the rating for A2 would equal 7

because
that is the respective rating.

but if A2 = 50

B3 = 21
C3 = 55
D3 = 12

then the rating for A2 would be 12 since it falls between B3 and C3.

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default STILL DESPERATE FOR HELP!!!


LastRow = Range("B" & Rows.count).end(xlup).Row
Rating = 0
for RowCount = 2 to LastRow
if A2 = Range("B" & Rowcount) and _
A2 <= Range("C" & Rowcount) then

Rating = Range("D" & Rowcount)
exit for
end if
next RowCount
"edm1007" wrote:

I hope this is not confusing but what is displayed as the final rating for A2
depends on if it falls between the values in B2 and C2 or B3 and C3
respectively

for instance

A2 = 10

B2 = 5
C2 = 20
D2 = 7

So since A2 falls between B2 and C2 the rating for A2 would equal 7 because
that is the respective rating.

but if A2 = 50

B3 = 21
C3 = 55
D3 = 12

then the rating for A2 would be 12 since it falls between B3 and C3.

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 913
Default STILL DESPERATE FOR HELP!!!

On Sat, 6 Sep 2008 09:11:02 -0700, edm1007
wrote:

I hope this is not confusing but what is displayed as the final rating for A2
depends on if it falls between the values in B2 and C2 or B3 and C3
respectively

for instance

A2 = 10

B2 = 5
C2 = 20
D2 = 7

So since A2 falls between B2 and C2 the rating for A2 would equal 7 because
that is the respective rating.

but if A2 = 50

B3 = 21
C3 = 55
D3 = 12

then the rating for A2 would be 12 since it falls between B3 and C3.

Thanks


Try the following formula:

=SUMPRODUCT(--(A2=B$2:B$3),--(A2<=C$2:C$3),D$2:D$3)

Change the 3's if you have more rows with possible intervals and
ratings

If there are no gaps in the intervals the following formula can be
used:

=VLOOKUP(A2,B$2:D$3,3)

Change D3, but not the 3, to reflect the last row of
intervals/ratings.

Hope this helps. / Lars-Åke
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 793
Default STILL DESPERATE FOR HELP!!!

Enter 5, 21, 56 ... (lower values of your intervals) in Col A, enter 7, 12,..
(the value you want to assign based on which interval it falls in in Col B,
Enter 12, 50,... (values to check in which interval it finds and assign the
value in Col B) in Col C.

Enter the following in D1 and copy down;
=VLOOKUP(C1,A:B,2,TRUE)

Let me know how it goes

"edm1007" wrote:

I hope this is not confusing but what is displayed as the final rating for A2
depends on if it falls between the values in B2 and C2 or B3 and C3
respectively

for instance

A2 = 10

B2 = 5
C2 = 20
D2 = 7

So since A2 falls between B2 and C2 the rating for A2 would equal 7 because
that is the respective rating.

but if A2 = 50

B3 = 21
C3 = 55
D3 = 12

then the rating for A2 would be 12 since it falls between B3 and C3.

Thanks



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default STILL DESPERATE FOR HELP!!!

if you are looking for a formula solution use the following VLOOKUP.

=VLOOKUP(A2,$B$2:$D$100,3)

You only need to look at column Bsince the values in column B are sorted and
are one larger than the value in Column C. Vllookup will find the largest
value in Column B that is less than or equal to the value you are looking
for, then return the value in column D whic is the 3rd column in the Table
range (B2:B100)

"Sheeloo" wrote:

Enter 5, 21, 56 ... (lower values of your intervals) in Col A, enter 7, 12,..
(the value you want to assign based on which interval it falls in in Col B,
Enter 12, 50,... (values to check in which interval it finds and assign the
value in Col B) in Col C.

Enter the following in D1 and copy down;
=VLOOKUP(C1,A:B,2,TRUE)

Let me know how it goes

"edm1007" wrote:

I hope this is not confusing but what is displayed as the final rating for A2
depends on if it falls between the values in B2 and C2 or B3 and C3
respectively

for instance

A2 = 10

B2 = 5
C2 = 20
D2 = 7

So since A2 falls between B2 and C2 the rating for A2 would equal 7 because
that is the respective rating.

but if A2 = 50

B3 = 21
C3 = 55
D3 = 12

then the rating for A2 would be 12 since it falls between B3 and C3.

Thanks

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default STILL DESPERATE FOR HELP!!!

If you only have those 2 sets of values in B:D...

=IF(AND(B2<=A2,C2=A2),D2,IF(AND(B3<=A2,C3=A2),D3 ,""))

If you have "many" sets of values...

=IF(A2<B2,"",VLOOKUP(A2,B2:D5,3))

--
Biff
Microsoft Excel MVP


"edm1007" wrote in message
...
I hope this is not confusing but what is displayed as the final rating for
A2
depends on if it falls between the values in B2 and C2 or B3 and C3
respectively

for instance

A2 = 10

B2 = 5
C2 = 20
D2 = 7

So since A2 falls between B2 and C2 the rating for A2 would equal 7
because
that is the respective rating.

but if A2 = 50

B3 = 21
C3 = 55
D3 = 12

then the rating for A2 would be 12 since it falls between B3 and C3.

Thanks



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default STILL DESPERATE FOR HELP!!!

Thanks this produced the exact results I was looking for. Thanks a
million!!!!!!!!!!!!!

"Joel" wrote:

if you are looking for a formula solution use the following VLOOKUP.

=VLOOKUP(A2,$B$2:$D$100,3)

You only need to look at column Bsince the values in column B are sorted and
are one larger than the value in Column C. Vllookup will find the largest
value in Column B that is less than or equal to the value you are looking
for, then return the value in column D whic is the 3rd column in the Table
range (B2:B100)

"Sheeloo" wrote:

Enter 5, 21, 56 ... (lower values of your intervals) in Col A, enter 7, 12,..
(the value you want to assign based on which interval it falls in in Col B,
Enter 12, 50,... (values to check in which interval it finds and assign the
value in Col B) in Col C.

Enter the following in D1 and copy down;
=VLOOKUP(C1,A:B,2,TRUE)

Let me know how it goes

"edm1007" wrote:

I hope this is not confusing but what is displayed as the final rating for A2
depends on if it falls between the values in B2 and C2 or B3 and C3
respectively

for instance

A2 = 10

B2 = 5
C2 = 20
D2 = 7

So since A2 falls between B2 and C2 the rating for A2 would equal 7 because
that is the respective rating.

but if A2 = 50

B3 = 21
C3 = 55
D3 = 12

then the rating for A2 would be 12 since it falls between B3 and C3.

Thanks

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default STILL DESPERATE FOR HELP!!!

This is a very simple VLOOKUP problem that people are using exotic solutions
that aren't necessary. Column C is not need to solve this problem. column C
is usful for people who are reading the Table butr doesn't need to be used
when creating the formula. VLOOKUP has a nice feature that it will work on a
range of values, as well as, exact values!

"T. Valko" wrote:

If you only have those 2 sets of values in B:D...

=IF(AND(B2<=A2,C2=A2),D2,IF(AND(B3<=A2,C3=A2),D3 ,""))

If you have "many" sets of values...

=IF(A2<B2,"",VLOOKUP(A2,B2:D5,3))

--
Biff
Microsoft Excel MVP


"edm1007" wrote in message
...
I hope this is not confusing but what is displayed as the final rating for
A2
depends on if it falls between the values in B2 and C2 or B3 and C3
respectively

for instance

A2 = 10

B2 = 5
C2 = 20
D2 = 7

So since A2 falls between B2 and C2 the rating for A2 would equal 7
because
that is the respective rating.

but if A2 = 50

B3 = 21
C3 = 55
D3 = 12

then the rating for A2 would be 12 since it falls between B3 and C3.

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
DESPERATE FOR HELP!!! edm1007 Excel Discussion (Misc queries) 4 September 6th 08 03:33 AM
Desperate max power Excel Discussion (Misc queries) 0 December 29th 06 01:52 AM
Desperate...please help! sas Excel Worksheet Functions 3 January 22nd 06 08:09 PM
In desperate need of help.... mrskitz Excel Discussion (Misc queries) 3 January 13th 06 02:48 PM
Desperate NEED!!!! huntr357 Excel Worksheet Functions 3 April 21st 05 04:47 PM


All times are GMT +1. The time now is 10:02 PM.

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"