Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default locating the cell having maximum value


Hi,

I have to locate the cell which has the maximum value (values rang
from 1 to 5, user can input vary from 1 entry to 5 entries) in
ragne of ("L26:L38") and copy the content of another cell which ha
offset of(0,-10) from the maximum value cell. Then I have to paste i
in ("B83").

This code is a small part of a long macro. So I specifically need VB
code.

Could any one please help?

Thanks.

Twinkl

--
twinklejm
-----------------------------------------------------------------------
twinklejmj's Profile: http://www.excelforum.com/member.php...fo&userid=2708
View this thread: http://www.excelforum.com/showthread.php?threadid=46941

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default locating the cell having maximum value

something simple like this, or do you need something more elaborate?

Sub maxNum()

Range("b83").Formula = "=maxa(L26:L38)"

End Sub

--


Gary


"twinklejmj" wrote
in message ...

Hi,

I have to locate the cell which has the maximum value (values range
from 1 to 5, user can input vary from 1 entry to 5 entries) in a
ragne of ("L26:L38") and copy the content of another cell which has
offset of(0,-10) from the maximum value cell. Then I have to paste it
in ("B83").

This code is a small part of a long macro. So I specifically need VBA
code.

Could any one please help?

Thanks.

Twinkle


--
twinklejmj
------------------------------------------------------------------------
twinklejmj's Profile:
http://www.excelforum.com/member.php...o&userid=27085
View this thread: http://www.excelforum.com/showthread...hreadid=469413



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default locating the cell having maximum value


Thanks, Gari.

But I fear that it is not enough. I don't want to copy the max value
rather I have to locate the max value cell. Then go to another cell in
the same row - offest from the max value cell by (0,-10) and copy the
content of that cell. The content of that cell is text.

Could any one please help?

I just reprhase my need:

I have to locate the cell containing maximum value in the range
("L26:L38"). This range contains user input, which can vary from
minimum one entry (in any one cell in L26:L38) to maximum 5 entries(in
any 5 different cells in L26:L38) . I have to locate (not copy) the
maximum value cell among the cells with user entries. Then go to
another cell in the same row but a different column (column-"B"). Copy
the text content given in that cell in "B". Then paste that selected
text in ("B83").


Thanks a lot.

Twinkle


--
twinklejmj
------------------------------------------------------------------------
twinklejmj's Profile: http://www.excelforum.com/member.php...o&userid=27085
View this thread: http://www.excelforum.com/showthread...hreadid=469413

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default locating the cell having maximum value

in B83 put in the formula

=Index(B26:B38,match(max(L26:L38),L26:L38,0),1)

--
Regards,
Tom Ogilvy

"twinklejmj" wrote
in message ...

Thanks, Gari.

But I fear that it is not enough. I don't want to copy the max value
rather I have to locate the max value cell. Then go to another cell in
the same row - offest from the max value cell by (0,-10) and copy the
content of that cell. The content of that cell is text.

Could any one please help?

I just reprhase my need:

I have to locate the cell containing maximum value in the range
("L26:L38"). This range contains user input, which can vary from
minimum one entry (in any one cell in L26:L38) to maximum 5 entries(in
any 5 different cells in L26:L38) . I have to locate (not copy) the
maximum value cell among the cells with user entries. Then go to
another cell in the same row but a different column (column-"B"). Copy
the text content given in that cell in "B". Then paste that selected
text in ("B83").


Thanks a lot.

Twinkle


--
twinklejmj
------------------------------------------------------------------------
twinklejmj's Profile:

http://www.excelforum.com/member.php...o&userid=27085
View this thread: http://www.excelforum.com/showthread...hreadid=469413



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
locating the cell that contains the MIN or MAX JR Excel Discussion (Misc queries) 2 April 21st 09 05:41 PM
Locating cell using Hyperlink stew Excel Discussion (Misc queries) 10 November 3rd 08 02:23 PM
Locating a cell within a macro Ron (Bismark) Excel Worksheet Functions 1 December 18th 06 07:24 AM
Locating Last Nonzero Cell in a Row wilby31 Excel Worksheet Functions 6 September 15th 05 08:19 PM
Locating first blank cell Mike W New Users to Excel 3 August 25th 05 09:02 PM


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