Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need a VBA code in excel to accomplish the following assignment:. We are given a spreadsheet for processing and use that has blank rows

I need a VBA code in excel to accomplish the following assignment:.

We are given a spreadsheet for processing and use that has blank rows in it which we wish to eliminate.

image text in transcribed

Gather data from the worksheet into array form in the memory. You will need to use multiple arrays because the spreadsheet has two different types of data (text string, and numerical values) and you cant mix data types within a given array. Skip over the blank rows.

Once all your data is in the computer memory, clear the worksheet.

Rewrite the data to the worksheet, without the empty rows.

PRO TIP: Sheet Clears and Rewrites done by VBA cant be undone with the undo button in Excel. When you are in develop/test mode, dont clear the worksheet, and rewrite the data into columns 7-10 (for example) so you can see both old and new formatting at the same time. This way you dont erase anything you are still working on. Once you are sure its working correctly, add in the Sheet1.Cells.Clear statement, and then put your output in columns 1-4 instead.

Month January February March April May June July August September October November December Widgets Doodads Thingies 1846 2951 8356 7388 1273 4214 3360 9619 8372 2309 9996 6583 2473 9942 8259 4335 1902 7247 8591 5077 5197 5463 6556 6019 1405 5595 9135 9692 9025 2477 3465 6138 4587 5909 7744 3321

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

How To Build A Million Dollar Database

Authors: Michelle Bergquist

1st Edition

0615246842, 978-0615246840

More Books

Students also viewed these Databases questions