Find and transpose adjacent values

J

J.W. Aldridge

Need code that does the following when run:

List of dates start in a1:a300
In a1: "12/31/09"
Adjacent Names in b1"larry", c1"curly", d1"moe"

Dates in E1:N65 (range name "calendar")

When code is run...

If date in a1 is found in named range, paste & transpose values under
date.
ie. if date in a1 is found in E20,

paste values "larry" in e21
paste values "curly" in e22
paste values "moe" in e23
 
N

Norbert

J.W. Aldridge said:
Need code that does the following when run:

List of dates start in a1:a300
In a1: "12/31/09"
Adjacent Names in b1"larry", c1"curly", d1"moe"

Dates in E1:N65 (range name "calendar")

When code is run...

If date in a1 is found in named range, paste & transpose values under
date.
ie. if date in a1 is found in E20,

paste values "larry" in e21
paste values "curly" in e22
paste values "moe" in e23
try something like this:

Range("A1").select
fo n=1 to 300
if Range("A" & n).value= whatever then
Range("E"& n & ":N" & n).selct
selection.copy
Range("E" & n).select
Selection.PasteSpecial Paste:=xlAll, Operation:=xlNone, SkipBlanks:=
False, Transpose:=True
else
end if
next n
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top