Text in Macro
Closed
Lucy
-
Aug 16, 2012 at 08:41 AM
ExcelJosh Posts 12 Registration date Wednesday August 8, 2012 Status Contributor Last seen October 12, 2012 - Sep 5, 2012 at 08:36 AM
ExcelJosh Posts 12 Registration date Wednesday August 8, 2012 Status Contributor Last seen October 12, 2012 - Sep 5, 2012 at 08:36 AM
Related:
- Text in Macro
- Spell number in excel without macro - Guide
- Macros in excel download free - Download - Spreadsheets
- Excel macro to create new sheet based on value in cells - Guide
- Run macro on opening workbook - Guide
- Excel vba assign macro to button programmatically - Guide
3 responses
Hi,
I have a problem which I think is like Lucy's. If anyone has the time to look at her problem, I wonder if you could look at mine too?
Every month I enter some transaction details on a spreadsheet (purchase/ sale qty/price, interest etc.) and it would be good to include a sum in the macro I run. At the moment the macro just formats the next row and then I have to put the sums in myself, but like Lucy, if there was a way to define the top row to sum from, I could get the totals in automatically.
Thanks a lot for your help, for me and Lucy!
I have a problem which I think is like Lucy's. If anyone has the time to look at her problem, I wonder if you could look at mine too?
Every month I enter some transaction details on a spreadsheet (purchase/ sale qty/price, interest etc.) and it would be good to include a sum in the macro I run. At the moment the macro just formats the next row and then I have to put the sums in myself, but like Lucy, if there was a way to define the top row to sum from, I could get the totals in automatically.
Thanks a lot for your help, for me and Lucy!
Hi Beth,
It does sound like we're trying to do the same type of thing.
I'm tring a new approach (but it still doesn't work) - can you, or anyone else, help with the sum arguments?
Set topCell = Application.InputBox(prompt:="Select a cell", Type:=8)
ActiveCell.Value = Application.WorksheetFunction.sum("topCell:(R[-1]C"))
Thanks everyone for your time again,
Lucy
It does sound like we're trying to do the same type of thing.
I'm tring a new approach (but it still doesn't work) - can you, or anyone else, help with the sum arguments?
Set topCell = Application.InputBox(prompt:="Select a cell", Type:=8)
ActiveCell.Value = Application.WorksheetFunction.sum("topCell:(R[-1]C"))
Thanks everyone for your time again,
Lucy
ExcelJosh
Posts
12
Registration date
Wednesday August 8, 2012
Status
Contributor
Last seen
October 12, 2012
Sep 5, 2012 at 08:36 AM
Sep 5, 2012 at 08:36 AM
Lucy:
I'm not sure if it was a typo just in the forum, or if you copied and pasted from your code, but
ActiveCell.Value = Application.WorksheetFunction.sum("topCell:(R[-1]C"))
should probably be
ActiveCell.Value = Application.WorksheetFunction.sum("topCell:(R[-1]C)")
Notice the quote marks moved.
If this doesn't work, could you post a sample spreadsheet of what you are attempting? I'm a little confused.
Thank you,
Josh
I'm not sure if it was a typo just in the forum, or if you copied and pasted from your code, but
ActiveCell.Value = Application.WorksheetFunction.sum("topCell:(R[-1]C"))
should probably be
ActiveCell.Value = Application.WorksheetFunction.sum("topCell:(R[-1]C)")
Notice the quote marks moved.
If this doesn't work, could you post a sample spreadsheet of what you are attempting? I'm a little confused.
Thank you,
Josh