Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default sum value then insert new row

How can I make for loop?
the conditions a if total value column height = 5 and column
Article = "bike" then copy second row to row 6 (therefore 1 row
added between file 5 and 6)
thanks for your response

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default sum value then insert new row

columns don't have a height.................
do you mean row height or column width?
item will ALWAYS be added @ row 6?
susan

On Feb 28, 10:11 am, wrote:
How can I make for loop?
the conditions a if total value column height = 5 and column
Article = "bike" then copy second row to row 6 (therefore 1 row
added between file 5 and 6)
thanks for your response



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default sum value then insert new row

additionally,

how many columns are you summing?
or are they rows?
is all the data to be searched for the condition below row 6?

you aren't being very clear & i can't decipher what you want....
what i SEE is

article=columnA
total = column B

for each row in worksheet
if range("article")="bike" and
if range("total")= what????? then
sum what?
insert row @ row 5
copy row found to row 6

maybe somebody else can figure it out the way you've got it, but
you've lost me.
susan


On Feb 28, 10:45 am, "Susan" wrote:
columns don't have a height.................
do you mean row height or column width?
item will ALWAYS be added @ row 6?
susan

On Feb 28, 10:11 am, wrote:



How can I make for loop?
the conditions a if total value column height = 5 and column
Article = "bike" then copy second row to row 6 (therefore 1 row
added between file 5 and 6)
thanks for your response- Hide quoted text -


- Show quoted text -



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default sum value then insert new row

hello
no article height weight <--first row
1 motor 1 1 <--second row
2 motor tires 1 1
3 motor tires 1 1
4 motor tires 1 1
5 bike 1 1
6 motor tires 2 1
7 motor tires 1 1
8 motor tires 4 1
9 motor tires 1 1
10 motor tires 1 1
11 bike 1 1
12 motor tires 5 1
13 motor tires 1 1
14 motor tires 1 1
15 motor tires 2 1
16 bike 1 1
17 motor tires 1 1
18 motor tires 1 1
19 motor tires 1 1

excel file look like this.
How can I make loop for this
the conditions a if total value column height = 5 and column
Article = "bike" then copy second row to row 6 (therefore 1 row
added between file 5 and 6)
thanks for your response

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default sum value then insert new row

ahhh. that's much better.
so basically you want the information sorted????
but you are asking for
"bike" AND height=5
none of the cells you listed qualify for that.
all of the "bike" entries have height=1.
susan


On Feb 28, 11:07 am, wrote:
hello
no article height weight <--first row
1 motor 1 1 <--second row
2 motor tires 1 1
3 motor tires 1 1
4 motor tires 1 1
5 bike 1 1
6 motor tires 2 1
7 motor tires 1 1
8 motor tires 4 1
9 motor tires 1 1
10 motor tires 1 1
11 bike 1 1
12 motor tires 5 1
13 motor tires 1 1
14 motor tires 1 1
15 motor tires 2 1
16 bike 1 1
17 motor tires 1 1
18 motor tires 1 1
19 motor tires 1 1

excel file look like this.
How can I make loop for this
the conditions a if total value column height = 5 and column
Article = "bike" then copy second row to row 6 (therefore 1 row
added between file 5 and 6)
thanks for your response





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default sum value then insert new row

Hello Susan

for this reason maybe can use for loop statement, so that I can start
with summing from the second row. Like this
The value of the column "height" in the second row + the value in the
thirth row + the value in the fourth row, etc.
afterwards if the total value = 5, and on the same row = bike, then
copy the second row below.
Thanks voor your responses
Chris

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
insert row / insert column command buttons fairgreen Excel Worksheet Functions 1 October 29th 07 02:41 PM
How can I insert a date with an icon (calendar) insert Alfredo Mederico[_2_] Excel Discussion (Misc queries) 4 September 21st 07 01:20 AM
Macro to insert copy and insert formulas only to next blank row bob Excel Programming 0 June 30th 06 12:02 PM
Can I auto insert a worksheet when I insert a value in a cell. iainc Excel Worksheet Functions 0 April 27th 06 08:37 AM
Insert cell/format/text/fontsize and auto insert into header? Unfurltheflag Excel Programming 2 November 3rd 04 05:39 PM


All times are GMT +1. The time now is 03:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"