On 18 Oct, 13:04, Mike H <Mi...@discussions.microsoft.com> wrote:
> Apologies, You wanted code
>
> Right click your sheet tab, view code and paste this in and run it.
>
> Sub DateCodes()
> Dim MyRangeB As Range, MyRangeJ As Range , B As Range, J As Range
> Dim LastRowB As Long, LastrowJ As Long
> LastRowB = Cells(Rows.Count, "B").End(xlUp).Row
> LastrowJ = Cells(Rows.Count, "J").End(xlUp).Row
> Set MyRangeJ = Range("J1:J" & LastrowJ)
> Set MyRangeB = Range("B1:B" & LastRowB)
> For Each B In MyRangeB
> * * For Each J In MyRangeJ
> * * * * If B.Value = J.Value Then
> * * * * B.Offset(, 1).Value = J.Offset(, 1).Value
> * * * * End If
> * * Next
> Next
> End Sub
>
> Mike
>
>
>
> "ChipButtyMan" wrote:
> > On 18 Oct, 11:45, ChipButtyMan <colingra...@btinternet.com> wrote:
> > > Hi everyone,
>
> > * * * * *"C" * * * * * * * * * * * * * * * * * * * * * * * * * J" * *
> > * * *"K"
> > > 14/10/2008 * * * * * * * * * * * * * * * * * * *01/10/2008 * * *1
> > > 01/10/2008 * * * * * * * * * * * * * * * * * * *06/10/2008 * * *2
> > > 14/10/2008 * * * * * * * * * * * * * * * * * * *07/10/2008 * * *3
> > > 07/10/2008 * * * * * * * * * * * * * * * * * * *13/10/2008 * * *4
> > > 07/10/2008 * * * * * * * * * * * * * * * * * * *14/10/2008 * * *5
> > > 06/10/2008 * * * * * * * * * * * * * * * * * * *18/10/2008 * * *6
> > > 01/10/2008
> > > 13/10/2008
> > > 18/10/2008
>
> > > Column "B" is a list of dates in no particular order.
> > > Column "J" is a filtered list of those dates
> > > Column "K" is a list of values assigned to the different dates.
> > > How do I write the code to assign those values in column "K" to the
> > > dates in column "C"
> > > (they would be returned to the adjacent column "D")
>
> > > thank you for your help, your time & your and expertise.
>
> > I have repositioned the column labels!- Hide quoted text -
>
> - Show quoted text -
Wow! Thanks ever so much for your time Mike. Works perfectly.
I spent all last night trying to work it out & failed miserably.
Thanks again. You made my day :-)
|