View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Alternate row comparison

Give the following a try. Put these formulas in the indicated cells...

G1: =IF(G1G2,"Greater","")
G2: =IF(G2G1,"Greater","")

Now select both G1 and G2 and copy that selection down as far as needed.

--
Rick (MVP - Excel)


"GB3" <u57077@uwe wrote in message news:a12c0b39f293c@uwe...
Thanks Don. Looks like I should start to learn to write macros.

Anyway, my second question was related to an aspect writing formulas.
So if the formula, =Row(), returns the value "3" when used in row 3, and
"4"
when used in Row 4, etc.,
I was wondering if there were a way to specify G3 when in Row 3 by
using
a formula like ...
G[=Row()] -- in essence, someway to get the equivalent of a
pointer
to cell G3.

Thanks again for your help.

Don Guillett wrote:
A macro solution. If you have a header row change to 2 to cells
Don't understand the second question.

Sub largeroftworows()
Dim mc As String
mc = "g"
Dim i As Long
For i = 1 To Cells(Rows.Count, mc) _
.End(xlUp).Row Step 2
If Cells(i, "g") Cells(i + 1, "g") Then
Cells(i, "h") = "greater"
Else
Cells(i + 1, "h") = "greater"
End If
Next i
End Sub

I've seen a few similar problems, but not quite what I'm seeking help
for
here.

[quoted text clipped - 29 lines]

Thanks very much.