View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Conditional Autofill

set rng = Range(Range("B4"),Cells(rows.count,2).End(xlup))
for each cell in rng
if not isempty(cell) and Instr(1,cell.Value,"total",vbTextCompare) = 0
then
Range("D3").copy cell.offset(0,2)
end if
Next

--
Regards,
Tom Ogilvy


"uberathlete"
wrote in message
...

Hi all! I've got this problem and it's really bugging me!!

Say, I've got Sheet 1 (attached) and there's some formula (assume it's
some VLOOKUP formula) on D3. I basically need some macro that would
autofill the formula in D3 down to all the other cells in column D,
EXCEPT for those cells with no corresponding value in the B column and
those with "Total".

Any help would be greatly appreciated. Thanks!


+-------------------------------------------------------------------+
|Filename: Sheet 1.JPG |
|Download: http://www.excelforum.com/attachment.php?postid=4018 |
+-------------------------------------------------------------------+

--
uberathlete
------------------------------------------------------------------------
uberathlete's Profile:

http://www.excelforum.com/member.php...o&userid=28388
View this thread: http://www.excelforum.com/showthread...hreadid=483510