#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Macro Ranges

What statement can be wriiten in Macro
that I can say range1 = range2 divided by range3
if range2 1 and range 3 is 1
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,510
Default Macro Ranges

Try this example.

Sub If_Test()

Dim rng1 As Range
Dim rng2 As Range
Dim rng3 As Range

Set rng1 = Sheets("Sheet1").Range("A1")
Set rng2 = Sheets("Sheet1").Range("B1")
Set rng3 = Sheets("Sheet1").Range("C1")

If rng2 1 And rng3 1 Then
rng1 = rng2 / rng3
End If

End Sub

Regards,

OssieMac

"Macro Help" wrote:

What statement can be wriiten in Macro
that I can say range1 = range2 divided by range3
if range2 1 and range 3 is 1

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
Macro Help (Uppercase multiple ranges?) Ken Excel Discussion (Misc queries) 14 December 2nd 06 07:23 PM
macro to change date ranges Darren Excel Discussion (Misc queries) 2 January 5th 06 03:49 PM
Relative Ranges in excel macro edself Excel Discussion (Misc queries) 6 October 13th 05 02:02 PM
Relative Ranges in excel macro edself Excel Worksheet Functions 6 October 13th 05 02:02 PM
vba excel macro question...ranges zoola Excel Worksheet Functions 3 July 6th 05 08:56 PM


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

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"