Re: $$Excel-Macros$$ VBA question

2014-09-24 Thread ag sankar
update macro Sub test1() Dim lastrow As Long, xTitleID, I As Long Dim workrng As Range Set workrng = Application.Selection Set workrng = Application.InputBox("Range", xTitleID, workrng.Address, Type:=8) lastrow = Cells(65536, workrng.Column + 1).End(xlUp).Row + 1 For

Re: $$Excel-Macros$$ VBA question

2014-09-24 Thread Victor Momoh
You need to bring the lastrow=lastrow+1 into the IF statement, this seems to work Sub test() Dim cell As Range Dim lastrow As Long, xTitleID, I As Long lastrow = Range("b65536").End(xlUp).Row Dim workrng As Range Set workrng = Application.Selection Set workrng = Application

Re: $$Excel-Macros$$ VBA Question: Is x and y possible to macro?.......

2013-02-07 Thread David Grugeon
I agree with Paul in most respects. I would do one macro which does all 3 things. I would start from the top rather than from the bottom because the macro would be accumulating the two subtotals as it ran and then inserting the two rows, colouring them and populating them. I am assuming that the

Re: $$Excel-Macros$$ VBA Question: Is x and y possible to macro?.......

2013-02-07 Thread Paul Schreiner
I often tell people that VBA and Excel can do ANYTHING. all it takes is time (and $$) So, given that. The question isn't CAN it do it, but how easy is it to do? The first macro is simple. You really start from the bottom up and insert the two rows when the value changes. mainly because when you