LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 116
Default Finding a range and performing a function

Hi - I have a spreadsheet with several columns with dynamic ranges. Dynamic
CID range example: =Log!$N$5:INDEX(Log!$N:$N,SerialNbrs). The worksheet will
be updated each day, too big to keep formula's in it. So I want to find each
range that I have created, if a cell is empty, update it with the formula and
move down the range until the end of the range then move on to the next range.
I'm really stuck trying to get the macro to identify the range. Here is the
beginning....Help!

Sub FindNewInfo()

Dim CID As Range

For Each cell In Range("CID")
If IsEmpty(cell) Then

ActiveCell.FormulaR1C1 = _
"=INDEX('Daily Data'!C[-13]:C[-9],MATCH(Log!RC[-1],'Daily Data'!C[-13]
:C[-9],0),5)"
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
ActiveCell.Replace What:="#N/A", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Cells.Find(What:="#N/A", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=
_
False, SearchFormat:=False).Activate

End If
Next


End Sub

--
Message posted via http://www.officekb.com

 
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
finding text and performing a calculation scokaw Excel Worksheet Functions 2 February 4th 09 01:55 AM
Performing a Macro within a range Carrie Excel Programming 2 January 26th 08 12:25 AM
Performing Action on a Range of Rows JohnB[_2_] Excel Discussion (Misc queries) 1 July 20th 07 01:48 AM
Performing a function on visible cells only in a range creative Excel Discussion (Misc queries) 2 April 9th 07 05:14 PM
Function not performing copy ppsza[_3_] Excel Programming 1 May 3rd 04 04:57 PM


All times are GMT +1. The time now is 06:34 AM.

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

About Us

"It's about Microsoft Excel"