Find and transpose adjacent values

  • Thread starter Thread starter J.W. Aldridge
  • Start date Start date
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
 
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
 
Back
Top