View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Paul Paul is offline
external usenet poster
 
Posts: 661
Default Insert row & copy formulas

Hi there,
This is probably very simple but it beats this novice!
First is this block (Named"VolBlock")
Col A Col B Col C Col D ....... Col N Col
O Col P
1 Desc Code Std Price Per01 Vol Per12 Vol Tot Act Vol
Tot Fcast Vol
2 Water 100010 100.00 500 500 [Formula]
[Formula]
3 Sugar 100020 50.00 100 75
[Formula] [Formula]
......
121 Blank row
122 Totals formulas (Cols D - P)

Below is this block (Named: "PriceBlock")
Col A Col B Col C Col D ....... Col N
130 Desc Code [blank] Per01 Price Per12 Price
Water 100010 110.00 120.35
Sugar 100020 45.00 47.00
etc

What I want is macro to insert new codes (say 100015):
1. Inputbox for the new code (InputBox("Enter Code") - I can do that bit!)
2. Check if code already exists, if so then end macro
3. Insert a row in the right place & place the Code no. in col B
4. Input boxes for Desc $ Std Price
5. Copy the formulas in cols O & P
6. Go down to PriceBlock, insert the row and copy the Desc & Code from
VolBlock

Like I say, this looks like this should be pretty basic but I'm stumped.

Many thanks in advance

Paul