Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default last duplicate value

Hi...

How could I find the last duplicate value the following way:


IF this is the data,


A B


1: day1 Jan
2: day1 Feb
3: day1 Mar
4: day2 Apr
5: day2 May
6: day3 June
7: day3 July
8: day5 Aug
9: day5 Sep


How could I display the last value of each type and the respective
column B data (in a textbox):

A B

day1 Mar
day2 May
day3 July
day5 Sep


Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default last duplicate value

Sub Find Dupes

Range("A1").Activate
Do
If Activecell = Activecell.Offset(1,0) Then
Activecell.Offset(1,0).Activate
Else
MsgBox("The Last duplicate is " & Activecell.Offset(0,1))
End If
ActiveCell.Offset(1,0).Activate
Loop until Activecell = ""
End Sub
--
Best wishes,

Jim


" wrote:

Hi...

How could I find the last duplicate value the following way:


IF this is the data,


A B


1: day1 Jan
2: day1 Feb
3: day1 Mar
4: day2 Apr
5: day2 May
6: day3 June
7: day3 July
8: day5 Aug
9: day5 Sep


How could I display the last value of each type and the respective
column B data (in a textbox):

A B

day1 Mar
day2 May
day3 July
day5 Sep


Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default last duplicate value

=INDEX($B$1:$B$20,MAX(IF($A$1:$A$20="day1",ROW($A$ 1:$A$20))))

this is an array formula, so commit with Ctrl-Shift-Enter, not just Enter

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



wrote in message
ups.com...
Hi...

How could I find the last duplicate value the following way:


IF this is the data,


A B


1: day1 Jan
2: day1 Feb
3: day1 Mar
4: day2 Apr
5: day2 May
6: day3 June
7: day3 July
8: day5 Aug
9: day5 Sep


How could I display the last value of each type and the respective
column B data (in a textbox):

A B

day1 Mar
day2 May
day3 July
day5 Sep


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
duplicate amie etincelle Excel Discussion (Misc queries) 1 May 23rd 08 05:56 PM
Duplicate Alam Excel Discussion (Misc queries) 2 December 3rd 07 07:30 AM
Is it a duplicate row? GettingThere Excel Programming 7 November 28th 06 03:42 PM
How do you delete duplicate addresses, but keep duplicate names? Shelly Excel Discussion (Misc queries) 1 August 28th 06 10:36 PM
duplicate #'s JD Excel Programming 2 October 31st 03 06:25 PM


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