Re: $$Excel-Macros$$ Reference sheet number in macro

2010-12-15 Thread Pete
Outrageous! We like simple. :) Many thanks Paul. Pete On Dec 15, 1:50 pm, Paul Schreiner wrote: > If that's the case, use: > > ShtName = sheet11.Name > > Range("N15") = "=SUM('" & ShtName & "'!AC3403:AC3409)*1000" > >

$$Excel-Macros$$ Re: Tab name changes, macro references old name

2010-12-13 Thread Pete
Thank you! Pete On Dec 11, 2:09 am, Ayush wrote: > Hi Pete, > > No Question is silly question... :) > > In case the sheet name changes, you can give reference of sheet index. > Here is example: > > USE --> Sheets(3).Select > The digit 3 is the 3rd sheet of the

$$Excel-Macros$$ Tab name changes, macro references old name

2010-12-11 Thread Pete
s job. Is there a way to update the macro to have it reference the new sheet name when changing the sheet name? TIA for ideas. Pete -- -- Some important links for excel users: 1. Follow us on TWITTER for tips trick

$$Excel-Macros$$ Re: how to code macro for use on multiple worksheets

2009-11-30 Thread pete
problem solved thanks On Nov 30, 9:34 pm, pete wrote: > Hi Gurus > > I've set up the following sub which I want to use on other sheets (set > up the same) in the same workbook. It's in a module (I tried putting > it in the sheets & this workbook) - still lear

Re: $$Excel-Macros$$ Re: Excel 2003 XP pro - how to reference an adjacent cell in a formula

2009-11-30 Thread pete
e line, > since if you aren't ON Sheet1 when you run the macro, > you probably aren't going to be in the correct cell anyway!!! > > Is that what you're looking for? > > to make sure you don't have the wrong cell selected, > you could use: > > If (act

$$Excel-Macros$$ how to code macro for use on multiple worksheets

2009-11-30 Thread pete
vate End Sub I know line 1. needs to be changed but not sure what to. There are a total of 4 worksheets. I'm developing this on 2003 XP Pro but it also needs to work on 2007. All help appreciated. regards Pete -- ---

Re: $$Excel-Macros$$ Re: Excel 2003 XP pro - how to reference an adjacent cell in a formula

2009-11-30 Thread pete
1000 $11000 5. 30/11/09 E is a formula to add interest & deduct any payments in C: E4 =E3+D4- C4 On Nov 30, 8:30 pm, Dave Bonallack wrote: > Hi Pete, > You can't use the offset function with only 1 thingy. ie Offset(, 2) is > incorrect syntax. >

Re: $$Excel-Macros$$ Re: Excel 2003 XP pro - how to reference an adjacent cell in a formula

2009-11-30 Thread pete
's just copying the formula for the balance - I need to be able to edit this to multiply by 10% & divide by 12. Any ideas cheers Peta On Nov 30, 2:58 pm, Dave Bonallack wrote: > Hi Pete, > > You can shorten your current code to: > > Worksheets("Sheet1").Activat

$$Excel-Macros$$ Re: Excel 2003 XP pro - how to reference an adjacent cell in a formula

2009-11-29 Thread pete
E3. From E4 down the column there is the formula =E3+D4-C4 (to deduct payments & add interest) (balance is a negative). Sorry for the multiple posts. Regards Pete On Nov 29, 7:23 pm, pete wrote: > Hi - i've got basic VBA knowledge & haven't been able to find how to > select a

$$Excel-Macros$$ Re: Excel 2003 XP pro - macro to move relative to current cell - found solution thanks

2009-11-29 Thread pete
ActiveCell.Offset(rowOffset:=1, columnOffset:=-1).Activate ActiveSheet.Paste Application.CutCopyMode = False ActiveCell.FormulaR1C1 = "=R[-1]C+RC[-1]*0.1/12" ActiveCell.Offset(rowOffset:=1, columnOffset:=-3).Activate End Sub On Nov 29, 7:23 pm, pete wrote: > Hi - i

$$Excel-Macros$$ Re: Excel 2003 XP pro - macro to move relative to current cell

2009-11-29 Thread pete
Cell.FormulaR1C1 = "=R[-1],C[1]*0.1/12" --problem here - formula given =3:3,E:E*0.1/12 ActiveCell.Offset(rowOffset:=2, columnOffset:=-3).Activate Thanks for any assistance. On Nov 29, 7:23 pm, pete wrote: > Hi - i've got basic VBA knowledge & haven't been abl

$$Excel-Macros$$ Excel 2003 XP pro - macro to move relative to current cell

2009-11-29 Thread pete
ect End Sub I want to do this every month & so thought I'd try automating it. I need to change line 3 to offset to column D on same line. Line 4 gets the last balance (column E line above current) & works out a months interest. I h