Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
HI
I have a problem. This Sub dont work. What can be wrong? Sub cell() For Each Cells In Range("A1:K120") cell.Value = cell.Value Next End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Grüezi Geir
Geir schrieb am 28.12.2004 I have a problem. This Sub dont work. What can be wrong? Sub cell() For Each Cells In Range("A1:K120") cell.Value = cell.Value Next End Sub Try the followiong instead: Range("A1:K120").Value = Range("A1:K120").Value -- Regards Thomas Ramel - MVP for Microsoft-Excel - [Win XP Pro SP-1 / xl2000 SP-3] |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Thomas it works fine.
Geir "Thomas Ramel" wrote: Grüezi Geir Geir schrieb am 28.12.2004 I have a problem. This Sub dont work. What can be wrong? Sub cell() For Each Cells In Range("A1:K120") cell.Value = cell.Value Next End Sub Try the followiong instead: Range("A1:K120").Value = Range("A1:K120").Value -- Regards Thomas Ramel - MVP for Microsoft-Excel - [Win XP Pro SP-1 / xl2000 SP-3] |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do you know it "dont work"
All it does is replace each cell's value by what is already there. That is to say, it does nothing. Bernard "Geir" wrote in message ... HI I have a problem. This Sub dont work. What can be wrong? Sub cell() For Each Cells In Range("A1:K120") cell.Value = cell.Value Next End Sub |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Two things:
1) Change the name of your subroutine. You're using a reserved name ("cell"). 2) Change "For Each Cells..." to "For Each Cell..." -Glenn Ray Geir wrote: HI I have a problem. This Sub dont work. What can be wrong? Sub cell() For Each Cells In Range("A1:K120") cell.Value = cell.Value Next End Sub |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Does this give you a hint.
for each cell S But Thomas gave you a good answer. -- Don Guillett SalesAid Software "Geir" wrote in message ... HI I have a problem. This Sub dont work. What can be wrong? Sub cell() For Each Cells In Range("A1:K120") cell.Value = cell.Value Next End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|