Dynamic Range in excel using vb6
Solved/Closed
Related:
- Dynamic Range in excel using vb6
- Excel vba autofill dynamic range ✓ - Forum - Excel
- If formula for date range in excel - Guide
- Dynamic range and named ranges ✓ - Forum - Excel
- Find data and copy dynamic range ✓ - Forum - Excel
- Excel if range of cells contains specific text then return value ✓ - Forum - Excel
1 reply
rizvisa1
Jun 24, 2010 at 07:06 PM
- Posts
- 4479
- Registration date
- Thursday January 28, 2010
- Status
- Contributor
- Last seen
- May 5, 2022
Jun 24, 2010 at 07:06 PM
Not clear what you were trying to do here
.Cells(rs.RecordCount + 5, iCol + 1).Value= "=Sum("Colsum" & iCol)"
since code is not complete it is hard to tell, as forexample what is colsum etc
i would guess you would need to change some thing close to
.Cells(rs.RecordCount + 5, iCol + 1).formula= "=Sum(" & Colsum & iCol & ")"
.Cells(rs.RecordCount + 5, iCol + 1).Value= "=Sum("Colsum" & iCol)"
since code is not complete it is hard to tell, as forexample what is colsum etc
i would guess you would need to change some thing close to
.Cells(rs.RecordCount + 5, iCol + 1).formula= "=Sum(" & Colsum & iCol & ")"
Jun 26, 2010 at 03:15 AM
Thak you for your response.
Eventhough u r not clear, i got the answer to my problem. i used the following
.Cells(rs.RecordCount + 5, iCol + 1).value= "=Sum(" & Colsum & iCol & ")"
now it is working perfect.
For your information Colsum is the name of the dynamic range, iCol is the column no. , and rs is the recordset.
Thanks again.
Feb 9, 2015 at 09:07 AM