LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,344
Default Assigning values to dates

Hi,

Since you didn't specify the where you data starts in column C or whether it
is solid or whether there is data below it with is not part of the data, here
is a really simple, and extremely fast macro:

Sub LookupStuff()
Selection = "=VLOOKUP(C2,K$2:J$10,2,FALSE)"
Selection = Selection.Value
End Sub

In this case the first cell to be looked up is in C2 and the lookup range is
in K2:J10, you can adjust the code to meet your needs. To use this just
select the cells in column D which you want populated and run the macro.

--
Thanks,
Shane Devenshire


"ChipButtyMan" 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.

 
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
Assigning point values? Riptide Excel Worksheet Functions 2 July 23rd 07 12:54 PM
Assigning payment formulas to dates alancunn Excel Worksheet Functions 1 June 21st 07 02:32 AM
Assigning consecutive dates Brooke Excel Worksheet Functions 14 August 14th 06 10:45 PM
Assigning values to letters Cheri Excel Worksheet Functions 3 December 20th 05 03:55 AM
assigning values to array Juggernath[_4_] Excel Programming 16 November 26th 05 07:21 PM


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