Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Conditional Autofill


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'
some VLOOKUP formula) on D3. I basically need some macro that woul
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 an
those with "Total".

Any help would be greatly appreciated. Thanks

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

--
uberathlet
-----------------------------------------------------------------------
uberathlete's Profile: http://www.excelforum.com/member.php...fo&userid=2838
View this thread: http://www.excelforum.com/showthread.php?threadid=48351

  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Conditional Autofill


^^ Thanks Tom. I tried it, but there seems to be a syntax error in th
3rd line

--
uberathlet
-----------------------------------------------------------------------
uberathlete's Profile: http://www.excelforum.com/member.php...fo&userid=2838
View this thread: http://www.excelforum.com/showthread.php?threadid=48351

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Conditional Autofill

No there isn't, but I broke it into little short baby pieces so you wouldn't
choke <g

Sub abc()
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
End Sub

--
Regards,
Tom Ogilvy


"uberathlete"
wrote in message
...

^^ Thanks Tom. I tried it, but there seems to be a syntax error in the
3rd line.


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

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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Conditional Autofill


^^ Thanks

--
uberathlet
-----------------------------------------------------------------------
uberathlete's Profile: http://www.excelforum.com/member.php...fo&userid=2838
View this thread: http://www.excelforum.com/showthread.php?threadid=48351

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I autofill conditional formatting? JesiR Excel Worksheet Functions 6 May 16th 06 07:32 AM
Conditional Autofill uberathlete Excel Discussion (Misc queries) 1 November 9th 05 03:54 PM
conditional autofill???please? tafoyavision Excel Worksheet Functions 1 July 15th 05 12:32 AM
Autofill: Need to autofill one week block, (5) weekday only into cells. dstock Excel Discussion (Misc queries) 1 June 17th 05 08:21 PM
Q. Autofill question: Can I autofill alpha characters like I can numbers? George[_22_] Excel Programming 5 August 7th 04 10:33 AM


All times are GMT +1. The time now is 03:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"