Hi..
I want to copy the value of cell B21 (if not zero), to next empty cell in column B (after B26)and clear the cells B7:B8.
Pl. help me with a macro to do the above.
Thanks
Hi..
I want to copy the value of cell B21 (if not zero), to next empty cell in column B (after B26)and clear the cells B7:B8.
Pl. help me with a macro to do the above.
Thanks
Last edited by sarath25; 01-09-2011 at 04:48 AM.
How will you run the code?
![]()
Please Login or Register to view this content.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
By assigning it as macro to a button.. Thanks
Then add the code that I gave to you to a button on the sheet
Did, but get an error "Compile error; Invalid outside procedure"
Pls. note, I have attached the sheet for u,
On clicking the save button,
I need the total value of B21 to be copied to the next empty row in after B26 and
entries in B7:B8 & B16:B20 to be cleared.
Thanks
Last edited by sarath25; 01-09-2011 at 04:49 AM.
Hello sarath25,
Welcome to the Forum!
The following macro has been added to "Save" button in the attached workbook.
![]()
Please Login or Register to view this content.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Thanks a lot dear, can an If condition added in the beginning to perform the macro only if B21 is not zero.
Just add this near the top:
![]()
Please Login or Register to view this content.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
dOES THIS WORK?
![]()
Please Login or Register to view this content.
Thank you all for the kind help... I got it alright..
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
How to mark a thread Solved
Go to the first post
Click edit
Click Go Advanced
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks