View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jeannie v jeannie v is offline
external usenet poster
 
Posts: 127
Default Macro with Variable Data

Hi Ariel:

You've been great and very patient with me....

The problem is that the number of lines per specialist will vary....is there
a way to say: select all "Ebony Glover" from A to L and copy to the range on
Worksheet 1 from A4 to L13....it may not fill the entire range, but will log
all of Ebony's loggings for that day.

Does this make sense?
--
jeannie v


"Ariel Dugan" wrote:

Did you want the next four lines down?

If so, then replace this line

Range("A" & i & ":L" & i).copy

with this line

Range("A" & i & ":L" & i +4).copy

and that should work.

HTH
Ariel

"jeannie v" wrote:

Hi: I apologize that I am a real novice in Macros.

This is the macro that works great, but I want to tweak it just a little.

Sheets("Daily Attendance").Activate
n = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To n
If Cells(i, "A").Value = "Glover, Ebony" Then
v = Cells(i, "C").Value
Exit For
End If
Next
Sheets("Ebony G").Activate
Range("N21").Value = v


I want to create a macro to do almost the same thing, except I want it to
retrieve more than 1 field of data for the person...Can I tweak this one to
do what I want?

I want it to say say: If "Glover, Ebony" is found by auto-filter in Column A
from Cell A2:A160 in Agent Login-Logout, Take the data in Column A through
Column L and copy to Worksheet 1 "Ebony G" in Cells A4 to L14.

Any help would be appreciated.
--
jeannie v