If i have row 10-20 in column A filled, what vba code would i need to select a range in column C that selects rows 10-20
If that 10-20 rows in column A chnages to say 10-50 the vba code will select 10-50 in column C
Many Thanks
If i have row 10-20 in column A filled, what vba code would i need to select a range in column C that selects rows 10-20
If that 10-20 rows in column A chnages to say 10-50 the vba code will select 10-50 in column C
Many Thanks
Last edited by Directlinq; 03-04-2009 at 06:55 AM.
Depends on how you're identifying A ... you can use A and then Offset(,2) to select C
The above identifies a range by starting at row 10 in Col A and ending at last non-blank in A ... it then offsets the range by 2 columns - ie resulting in a range in Col C of those dimensions specified by values in A.Please Login or Register to view this content.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
That sound like what i want it to do but it is say syntax error when i put it in vba
As I said it identifies a range, you need to "do" something with it obviously (ie Set or .Value = "x" etc....), given I can't see your code and have no idea how you intend to use said range I can't comment any further.
Once the cells have been selected i was hoping to apply
formatting macroPlease Login or Register to view this content.
Last edited by Directlinq; 03-04-2009 at 05:48 AM.
Per Forum rules please Edit your last post and add CODE tags (highlight VBA & press # icon).
Also please specify significance of row 30 ... given this is not an absolute reference I am presuming the formulae you offer are for C30 ?
Row 30 is where the dates start from in column A but they could end anywhere below that in column A
OK so the starting row is 30 and not 10 as you specified earlier, correct ?
Please Login or Register to view this content.
You are correct row 30 is the starting row.
Sorry this vba code works but i thought by getting the code you gave me i could adapt it to the rest of my vba code. I think im in over my head. This is the full code
This is why im getting confused. So your offset will work for selecting individual columns but for more than 1 column it will not work.Please Login or Register to view this content.
Sorry, I thought i could work out what to do for the rest but they are more than 1 column.
I can't test as I don't have any data but perhaps the below will work for you
EDIT: VBA updated at 10:43 UK time.Please Login or Register to view this content.
Last edited by DonkeyOte; 03-04-2009 at 06:43 AM.
Wow perfect
Thank you so much
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks