Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Juana Fisher   on Aug 31 In MS Office Category.

  
Question Answered By: Adalrich Fischer   on Aug 31

I specifically need someone to take a look at the attached VBA lines to
help me identify why my attempts are not working. As noted in my
initial post, I'm still very green when it comes to VBA and I'm at a
loss on how to proceed next. I have been trying to get things  to work
out on my own, but I need a bit of expert insight/help to help finalize
my plan.

Right now, the code (see below) errors out when I am attempting to
assign the contents  of the current row, column  A to the variable "freq."
I would like to make this a relative reference, as the plan is to loop
this assignment process. Contents in column A represent the number  of
times I'd like to copy and paste  the first non-zero number in the row.

Range(0, 1).Select=freq


Maybe an example would be helpful. Below is a sample of the spreadsheet
that I would like to manipulate with the macro:

F Jan-2007 Feb-2007 Mar-2007 Apr-2007
May-2007 Jun-2007 Jul-2007 Aug-2007
Sep-2007
12 0 0 0 0 $ 50 0

12 0 0 0 0 0 $ 100

12 0 0 0 $ 75 0 0


Here is what I'm attempting to do. My spreadsheet will have the months
moving over to the right for the next few years, so this example
represents a sub-set of the actual application. The first column (in
gray background), represents the total number of months I'd like to
carry the first non-zero cell  contents. For the first row, I'd like the
VBA to start at Jan-2007 and do a validation process. If the contents
are zero, move  right to the next cell (same row). This continues until
we reach May-2007. I'd like to copy/paste special  value the $50 eleven
more times (a total of 12 times, minus the original amount in May).
Once this is completed, I'd like the macro  to step to the next row  and
repeat the process.

I have made my best attempt at getting the shell code put together, but
I'm rapidly moving well above my skill level. I was hoping that someone
could step in and help fill-in the blanks.

Share: 

 

This Question has 4 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Looped VBA to paste special values Or get search suggestion and latest updates.


Tagged: