LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Creating a Sub Function

How do I create a function that is sent one variable. I
want it be sent a variable called i and another FinalRow.
Then I want it to do it's thing. I want to be able to
call this function at anytime in my macro by just typing
FunctionName(i,FinalRow). Here what I want to be included
in my function

n = i
For n = i To FinalRow
If (Range("A" & n).Value) = "" And (Range("B" & n).Value)
= 1 And (Range("C" & n).Value) = 1 And (Range("D" &
n).Value) = "" Then
Rows(n & ":" & n).Cut
Rows(i & ":" & i).Insert Shift:=xlDown
End If
Next n

Thank you

 
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
Need help creating a function chrspty Excel Worksheet Functions 2 August 1st 08 04:48 PM
Creating a function BeginnerRick Excel Worksheet Functions 3 November 24th 06 09:12 PM
Need help creating a function nander Excel Discussion (Misc queries) 3 February 20th 06 04:57 AM
creating a function NeilPoehlmann Excel Discussion (Misc queries) 5 June 15th 05 08:08 PM
Creating a function Todd Huttenstine[_2_] Excel Programming 15 December 5th 03 11:38 PM


All times are GMT +1. The time now is 01:23 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"