PC Review


Reply
Thread Tools Rate Thread

Correct front end of dynamic range

 
 
smandula
Guest
Posts: n/a
 
      13th Dec 2008
Could someone suggest an change in two variables

Private Sub CommandButton1_Click()
x = Range("AA1").Value
x2 = Range("AA2").Value
'Highlight_Duplicates (Sheets("Sheet1").Range("C2:V" & x))
Highlight_Duplicates (Sheets("Sheet1").Range("C" & x2:"V" & x))

End Sub

I need a front end solution for x2
Or another solution

x by itself works great for only one dimension.

With Thanks

 
Reply With Quote
 
 
 
 
JLGWhiz
Guest
Posts: n/a
 
      13th Dec 2008
I thing that if you would define your objective a little better, someone
could easily give you an answer. The code you postes is ambiguous.

"smandula" wrote:

> Could someone suggest an change in two variables
>
> Private Sub CommandButton1_Click()
> x = Range("AA1").Value
> x2 = Range("AA2").Value
> 'Highlight_Duplicates (Sheets("Sheet1").Range("C2:V" & x))
> Highlight_Duplicates (Sheets("Sheet1").Range("C" & x2:"V" & x))
>
> End Sub
>
> I need a front end solution for x2
> Or another solution
>
> x by itself works great for only one dimension.
>
> With Thanks
>
>

 
Reply With Quote
 
smandula
Guest
Posts: n/a
 
      13th Dec 2008
On Dec 13, 4:52*pm, JLGWhiz <JLGW...@discussions.microsoft.com> wrote:
> I thing that if you would define your objective a little better, someone
> could easily give you an answer. *The code you postes is ambiguous.
>
> "smandula" wrote:
> > Could someone suggest an change in two variables

>
> > Private Sub CommandButton1_Click()
> > x = Range("AA1").Value
> > x2 = Range("AA2").Value
> > 'Highlight_Duplicates (Sheets("Sheet1").Range("C2:V" & x))
> > Highlight_Duplicates (Sheets("Sheet1").Range("C" & x2:"V" & x))

>
> > End Sub

>


Sorry, A more detailed explanation:

I am trying to designate a range from AA1 which would be the end
range, as
'Highlight_Duplicates (Sheets("Sheet1").Range("C2:V" & x)) which
works for x

How to also change the start range "C2" with a variable AA2? for x2
I tried
Highlight_Duplicates (Sheets("Sheet1").Range("C" & x2:"V" & x))
This doen't work

It is the front end of C2 that I am looking for a solution.

I hope this explanation helps


 
Reply With Quote
 
smandula
Guest
Posts: n/a
 
      13th Dec 2008
Solution

Thanks to everyone who read this message

Private Sub CommandButton1_Click()

x = Range("AA1").Value
x2 = Range("AA2").Value

Highlight_Duplicates (Sheets("Sheet1").Range("C" & x2 & ":V" & x))

End Sub

'-------------------------------------

Just rearranged Quotes


 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      14th Dec 2008
Sorry I could not interpret what you were after. I now see that you wanted
to use the variable for the AA2 value as the row number for Column C. Guess
I never thought of it as front end before.

"smandula" wrote:

> Solution
>
> Thanks to everyone who read this message
>
> Private Sub CommandButton1_Click()
>
> x = Range("AA1").Value
> x2 = Range("AA2").Value
>
> Highlight_Duplicates (Sheets("Sheet1").Range("C" & x2 & ":V" & x))
>
> End Sub
>
> '-------------------------------------
>
> Just rearranged Quotes
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
dynamic range based on criteria, within a dynamic range, passed to a function rajansood@hotmail.com Microsoft Excel Programming 5 9th Oct 2007 10:13 PM
creating a dynamic range based on criteria, within a dynamic range, and passing it to a function rajansood@hotmail.com Microsoft Excel Programming 0 9th Oct 2007 05:22 PM
Dynamic Range with unused formula messing up x axis on dynamic graph cabybake@yahoo.com Microsoft Excel Charting 2 2nd Feb 2006 08:02 PM
Dynamic Range with unused formula messing up x axis on dynamic graph cabybake Microsoft Excel Discussion 6 25th Jan 2006 06:40 PM
Excel 2000 VBA - Set Print Range in dynamic range sub_pop Microsoft Excel Programming 2 27th Jul 2004 08:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:26 PM.