if a cell is >0, how do I select a range of cells?

  • Thread starter Thread starter Angela0212
  • Start date Start date
A

Angela0212

I am trying to change an excel spreadsheet into something I can downloa
into our accounting software.
What I am looking for is.......

if H2 is greater than 0, then enter A2:G2 in separate cells, the
enter the H2 amount in the following cell.

I need to do this for up to 5 cells in a column. So if the cell ha
2000 in it... I need the cells to the left to show and the origina
cell amount. But I don't want the amount of the previous cell.

Help!!!
 
Slow down and try explaining it again. At least in my opinion, this
description is meaningless.

Enter what in A2:G2 and the following cell after G2 is H2????

Five cells in a column - what column? Where do they start.

For five cells, it might be easier for you to do it manually.
 
Okay, let me try again.

I have a spreadsheet. There are 10 columns. I am trying to move onl
parts to a second sheet.
The first 5 columns are mandatory. The next 5 columns may or may no
have a dollar amount in them. So for one row, I could have 5 dolla
amounts for one description (the first 5 columns).
So what I am trying to do is break it down line by line. Say the firs
non mandatory column has $10, what I need is to be able to have th
mandatory codes copy to another sheet along with the dollar amount
Then the second non mandatory column could have a $$ amount in it and
want it to pull the mandatory columns and that dollar amount but no
the first.
Does that make more sense
 
Much better

As I understand it, for each non empty cell in columns F:J, copy the
corresponding cells in A:E for that row and the value in the nonempty cell
to sheet2 in their own row.

Dim rw as Long, cell as Range, i as Long
rw = 2
for each cell in Range(Range("A2"),Cells(rows.count,1).end(xlup))
for i = 6 to 10
if Not isempty(cells(cell.row,i)) then
cell.Resize(1,5).copy Destination:=worksheets("Sheet2") _
.Cells(rw,1)
cells(cell.row,i).copy Destination:=worksheets("Sheet2") _
.Cells(rw,6)
rw = rw + 1
end if
Next i
Next

--
Regards,
Tom Ogilvy



"Angela0212 >" <<Ang
(e-mail address removed)> wrote in message
news:[email protected]...
 
Back
Top