Raman has attended:
Excel Introduction course
Excel Intermediate course
Excel Advanced course
Excel VBA Intro Intermediate course
Excel VBA Intro Intermediate course
Excel VBA
Hi, I have a query on writing SumIf & VLookups code, where the starting point of Data is know, but number of rows could vary for e.g. Number of rows could vary between 15 and 20.
VLookups:
Is it possible to set a dynamic Table Array, where starting point is know but number of rows could vary. I tried using CurrentRegion, but got an error.
SumIfs:
If starting points of Range (with Criteria) and Sum range are known but rows could vary. Would using the code below work:
Range with Criteria:
Range("A2").Select
Range(Selection, Selection.End(xlDown)).Select
Range with Criteria:
Range("C2").Select
Range(Selection, Selection.End(xlDown)).Select
Would CurrentRegion.Rows work?
Regards,
Raman
RE: Excel VBA
Hi Ramon, thanks for your query. You are on the right track! Dynamic Named Ranges are extremely useful when you have a fluctuating amount of data but rather difficult to explain simple on this forum. Here is a link to a walkthrough and prepare to get to know the OFFSET function very well...
http://www.ozgrid.com/Excel/DynamicRanges.htm
Hope this helps,
Anthony