Excel Item number labels with date stamp

  • Thread starter Thread starter karmakula
  • Start date Start date
K

karmakula

I've been beaten by excel. Please help me get this done on a sheet wit
odd cells unlocked and even cells locked.
I need a macro or vba with command buttons to perform the following o
a single column of up to 144 rows:
1. A command button to select only odd cells with data entries, (do no
include blank cells).
2. To print the selection of odd cells with data only and print al
even cells plus the trailing even cell after the last odd cell wit
data, (same command button as #1).
3. A separate command button to clear all odd cells and place the focu
on A1 so I can start all over again.
If possible, A separate command button to bring up a dialogue bo
asking how many times to copy & paste the data of the current cell t
the proceeding odd cells.

Than
 
Range("1:144").Hidden = False
for i = 1 to 143 step 2
if isempty(cells(i,1)) then
cells(i,1).Entirerow.Hidden = True
else
if rng is nothing then
set rng = Cells(i,1)
else
set rng = Union(rng,cells(i,1)
end if
maxrow = i
end if
Next
Range(Cells(1,1),Cells(maxrow+1,1)).Resize(,5).Printout
rng.Select


for i = 1 to 143 step 2
cells(i,1).ClearContents
Next
Range("A1").Select
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top