Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Select a cell based on an other cell's value


Hi!

I've got an excel-table. It looks something like this.

Table1
(A1)Month (B1)SMS
January 106
February 220
Mars 50

(A6)Max: =MAX(B2;B4)
(A7)Min: =MIN(B2;B4)

Now I want to find out what month B6 and B7 is and placing them in C6 &
C7.

In SQL I would have done something like

SELECT `month` FROM table1 WHERE SMS = B6

How do I do this?!

Many thanks, wally_91




--
wally_91
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Select a cell based on an other cell's value

Put this in C6:

=INDEX(A2:A4,MATCH(B6,B2:B4,0))

and this in C7:

=INDEX(A2:A4,MATCH(B7,B2:B4,0))

If you have two maximum values or two minimum values, the MATCH
function will find the first.

Hope this helps.

Pete

On Mar 11, 6:58*pm, wally_91
wrote:
Hi!

I've got an excel-table. It looks something like this.

Table1
(A1)Month (B1)SMS
January 106
February 220
Mars 50

(A6)Max: =MAX(B2;B4)
(A7)Min: =MIN(B2;B4)

Now I want to find out what month B6 and B7 is and placing them in C6 &
C7.

In SQL I would have done something like

SELECT `month` FROM table1 WHERE SMS = B6

How do I do this?!

Many thanks, wally_91

--
wally_91


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Select a cell based on an other cell's value


Thanks for the response!

I can't get this to work... I only get an errormessage:

http://img528.imageshack.us/img528/2...3120019dz6.png
(this is from Numbers but I get an error in excel too. It doesn't say
what though)

Thank you

Wally_91

Pete_UK;2668273 Wrote:
Put this in C6:

=INDEX(A2:A4,MATCH(B6,B2:B4,0))

and this in C7:

=INDEX(A2:A4,MATCH(B7,B2:B4,0))

If you have two maximum values or two minimum values, the MATCH
function will find the first.

Hope this helps.

Pete

On Mar 11, 6:58*pm, wally_91
wrote:-
Hi!

I've got an excel-table. It looks something like this.

Table1
(A1)Month (B1)SMS
January 106
February 220
Mars 50

(A6)Max: =MAX(B2;B4)
(A7)Min: =MIN(B2;B4)

Now I want to find out what month B6 and B7 is and placing them in C6
&
C7.

In SQL I would have done something like

SELECT `month` FROM table1 WHERE SMS = B6

How do I do this?!

Many thanks, wally_91

--
wally_91-





--
wally_91
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Select a cell based on an other cell's value


Hi again!

I got my answer at another place.

In C7 put

=offset(a1;match(b6;b2:b4;0);0)

In C8 put

=offset(a1;match(b7;b2:b4;0);0)

Thanks anyway (love this forum!!!)

wally_91


Pete_UK;2668273 Wrote:
Put this in C6:

=INDEX(A2:A4,MATCH(B6,B2:B4,0))

and this in C7:

=INDEX(A2:A4,MATCH(B7,B2:B4,0))

If you have two maximum values or two minimum values, the MATCH
function will find the first.

Hope this helps.

Pete

On Mar 11, 6:58*pm, wally_91
wrote:-
Hi!

I've got an excel-table. It looks something like this.

Table1
(A1)Month (B1)SMS
January 106
February 220
Mars 50

(A6)Max: =MAX(B2;B4)
(A7)Min: =MIN(B2;B4)

Now I want to find out what month B6 and B7 is and placing them in C6
&
C7.

In SQL I would have done something like

SELECT `month` FROM table1 WHERE SMS = B6

How do I do this?!

Many thanks, wally_91

--
wally_91-





--
wally_91
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Select a cell based on an other cell's value

Glad you found an answer to your problem, Wally - thanks for feeding
back.

Pete

On Mar 12, 9:19*pm, wally_91
wrote:
Hi again!

I got my answer at another place.

In C7 put

=offset(a1;match(b6;b2:b4;0);0)

In C8 put

=offset(a1;match(b7;b2:b4;0);0)

Thanks anyway (love this forum!!!)

wally_91

Pete_UK;2668273 Wrote:





Put this in C6:


=INDEX(A2:A4,MATCH(B6,B2:B4,0))


and this in C7:


=INDEX(A2:A4,MATCH(B7,B2:B4,0))


If you have two maximum values or two minimum values, the MATCH
function will find the first.


Hope this helps.


Pete


On Mar 11, 6:58*pm, wally_91
wrote:-
Hi!


I've got an excel-table. It looks something like this.


Table1
(A1)Month (B1)SMS
January 106
February 220
Mars 50


(A6)Max: =MAX(B2;B4)
(A7)Min: =MIN(B2;B4)


Now I want to find out what month B6 and B7 is and placing them in C6
&
C7.


In SQL I would have done something like


SELECT `month` FROM table1 WHERE SMS = B6


How do I do this?!


Many thanks, wally_91


--
wally_91-


--
wally_91- Hide quoted text -

- Show quoted text -


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
Formatting a cell with colour based on whether another cell's valu Kierano Excel Worksheet Functions 1 October 11th 06 06:05 PM
Applying conditional formatting to cell based on another cell's in kdesemple Excel Discussion (Misc queries) 1 March 22nd 06 06:37 PM
How do I populate a cell with another cell's value based on condit M Enfroy Excel Worksheet Functions 2 January 7th 06 12:52 AM
Creating a conditional format for a cell based on another cell's v steve-o Excel Discussion (Misc queries) 2 October 26th 05 03:51 PM
Conditional Formating for a cell based on another cell's value steve-o Excel Discussion (Misc queries) 1 October 6th 05 09:50 PM


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