Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Max Question

How do I get excel to look up the highest value in column d and then copy
both the value and the corresponding value in column a

Thanks in advance

Greg


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default Max Question

Hi Greg

the following code returns two variables
i - for the maximum value in column D
j - for the value in column A of the same row as i

Sub getmax()
i = Application.WorksheetFunction.Max(Range("D:D"))
j = Application.WorksheetFunction.Lookup(i, Range("D:D"), Range("A:A"))
End Sub



Cheers
JulieD


"Greg B" wrote in message
...
How do I get excel to look up the highest value in column d and then copy
both the value and the corresponding value in column a

Thanks in advance

Greg



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Max Question

Ok thank you

Greg


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default Max Question

you're welcome - let us know if you need anything else
(ps what part of Oz are you in?)

"Greg B" wrote in message
...
Ok thank you

Greg



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Max Question

Adelaide




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default Max Question

Perth

"Greg B" wrote in message
...
Adelaide



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
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
where can I see my question and answer? Yesterday I ask a question IP Excel Discussion (Misc queries) 2 May 10th 08 04:08 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
The question is an excel question that I need to figure out howto do in excel. Terry Excel Worksheet Functions 3 January 23rd 06 06:22 PM
Possible And If Question LS Steakhouse Excel Worksheet Functions 1 March 12th 05 02:45 PM


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