Thread: Excel
View Single Post
  #2   Report Post  
Old June 11th 06, 03:37 PM posted to microsoft.public.excel.misc
Posts: n/a
Default Excel

Hi Lorraine,

you can use Visual Basic.
Press alt+F11 to open the VBE
in the left hand upper pane right click and select insertmodule

paste this code into the code window in the centre

Sub Macro1()
For i = 1 To 256
Cells(4, i).Select
x = ActiveCell.Value
ActiveCell.Offset(1, 0).Range("A1:A909").Select
Selection.Replace What:="1", Replacement:=x, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
Next i
End Sub

Press F5 to execute the code.

Does this work as required.
NB there are only 256 columns in a worksheet.

let me know if this works


lorraine knight wrote:
I am trying to find a "1" in a column between rows 5 to 913 and replace
the "1" with data that is held in row 4 of the same column, I have 263
columns to do. Using the Find and Replace on each column is taking
ages, can I do this a quicker way? Would realy appreciate help

lorraine knight
lorraine knight's Profile:
View this thread: