473,468 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Please Help With A Simple VBA Macro

1 New Member
I am such a beginner that I can only do the 'record' macros, but I have promised to help someone and I find that I'm not able. Would you please write a macro for me since I have run out of time and have not been able to do it, even though I have really been trying? It is Excel 2003.

There are 5 columns, A-B-C and D always have data, E seldom has data. When column E does have data, the entire row needs to move to sheet 2 and the blank row left behind needs to be deleted. It would be good if the row would move on entering after typing in data. Also, there are already 100's of rows in this report, and if the macro could move all of those, that would be great.

Thank you so much!
Oct 5 '06 #1
1 1725
albertw
267 Contributor
I am such a beginner that I can only do the 'record' macros, but I have promised to help someone and I find that I'm not able. Would you please write a macro for me since I have run out of time and have not been able to do it, even though I have really been trying? It is Excel 2003.

There are 5 columns, A-B-C and D always have data, E seldom has data. When column E does have data, the entire row needs to move to sheet 2 and the blank row left behind needs to be deleted. It would be good if the row would move on entering after typing in data. Also, there are already 100's of rows in this report, and if the macro could move all of those, that would be great.

Thank you so much!
automated macro on keystrokes in not possible, but try this one on closing

Private Sub auto_close()
On Error Resume Next
Application.ScreenUpdating = False
If Not Sheets(1).Range("e1").Value = vbNullString Then
i = 0
While Not Sheets(2).Range("a1").Offset(0, i).Value = vbNullString
i = i + 1
Wend
Sheets(2).Range("a1").Offset(0, i).Value = Sheets(1).Range("e1").Value
Sheets(1).Range("e1").ClearContents
End If
ActiveWorkbook.Save
Application.ScreenUpdating = True
Application.Quit
End Sub
Oct 20 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Chiller | last post by:
I'm in the early stages of developing a class that will represent a metric distance by storing both a number and unit (ie KM, M, CM etc). I've developed some initial code as a starting point;...
8
by: Steph | last post by:
Hi. I'm very new to MS Access and have been presented with an Access database of contacts by my employer. I am trying to redesign the main form of the database so that a button entitled...
15
by: Buck Rogers | last post by:
Hi guys! Task 1: Write a program which presents a menu with 5 options. The 5th option quits the program. Each option should execute a system command using system(). Below is my humble...
16
by: David Ford | last post by:
I have a macro that I use across the board for freeing ram. I'd like to clean up my code so I don't get these warnings. #define sfree(x) _internal_sfree((void **)&x) #define _internal_sfree(x)...
2
by: tonytony24 | last post by:
Hi All: I was wondering if there's a simple way to call a MS Access Module through either Command Prompt MS Script any other way... Thanks for the response.
25
by: paytam | last post by:
hi all I want to redefine a function getchar() in header stdio.h ,but I don't know what should I do.
29
by: Ancient_Hacker | last post by:
It sure would be nice if I could have a macro that add a level of indirection to its argument. So if I write: AddIndirection( X ) The macro AddIndirection will do: #define X (*X) ...
14
by: amit.man | last post by:
Hello i need to write a MACRO function that look something like this """ do_somthing(); for(int i=0;i<100;i++) {do_something_else())} return(somthing_other_then_those()) // a double type """
12
by: swellfr | last post by:
Hi if have simple macro defined this way: #define M_OPplus( classname ) typedef classname operator+(const classname& rhs); and a template class : template<typename X, typename Y> class...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.