View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default It possible to multiply one cell by...?

Hi
try
sub foo()
dim rng as range
dim cell as rng
with activesheet
set rng = .range("A1:A20")
for each cell in rng
if cell.value=.range("D1").value
cell.value=cell.value*2
end if
next
end with
end sub

--
Regards
Frank Kabel
Frankfurt, Germany

"jose luis " schrieb im
Newsbeitrag ...
Hi,

I'm trying to multiply a range of values (A1:A20) by a fixed number
contained in a cell (c1) only if it equals certain condition.
(A1,A2,....etc. = D1). (from VBA).

Any idea?

Thanks a lot

jose luis


---
Message posted from http://www.ExcelForum.com/