View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jat jat is offline
external usenet poster
 
Posts: 33
Default loop to find text and place text in adjoining cell

i am trying to make the following a loop:

Selection.Find(What:="Employee Total", After:=ActiveCell, LookIn:= _
xlValues, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext _
, MatchCase:=False, SearchFormat:=False).Activate
Range("A38").Select
ActiveCell.FormulaR1C1 = "=RAND()"

basically, i want to find every cell where the cell text is "Employee Total"
in Column B, then in the adjoining cell in column A, enter the formula
"=RADN()".

after that, i recorded a code to remove all duplicate values in column A -
this works.

after that, i need a code to loop again to do the following:
for evey blank cell in the used range in Column C, copy the value in the
next cell down:

Col A - Column B - Column C
ID NUMBER - Employee Name - blank cell
=rand() - Employee Total - 75

the blank cell would copy the value 75. after than i think i can record the
macro for the final clean up and stuff.

any assiatance would be appreciated.

thank you,

jat