Excel formula/Macro

Hewlett-packard / Hp 530 notebook pc(kd096a...
August 27, 2009 at 05:56:38
Specs: Microsoft Windows XP Professional, 1.828 GHz / 1015 MB
Hi guys,

I am looking for assistance. I have a working sheet and then a quotation sheet that I need to show options from my working sheet if they have quantities.

What I need is if there is a quantity next to an item on my working sheet, I want that description to add to the next line on the quotation sheet. They are simple two column arrays, I just have no idea where to go. Any help would be greatly appreciated.


See More: Excel formula/Macro

Report •

August 27, 2009 at 06:53:50
You might be able to use a Worksheet_Change macro.

The macro would monitor changes to the working sheet and if a value is entered in the quantity column, it could copy the description to the quote sheet.

That part is fairly easy:

Private Sub Worksheet_Change(ByVal Target As Range)
 If Target.Column = 2 And Target.Cells.Count = 1 Then
  nxtRow = Sheets("Quotation").Range("A" & Rows.Count).End(xlUp).Row + 1
  Target.EntireRow.Copy Destination:=Sheets("Quotation").Range("A" & nxtRow)
 End If
End Sub

The harder part comes with dealing with changes to the quantity, or deletion of an item or other changes that you might want to make while building the quote.

Since my "simple" code is going to copy the row whenever a change is made to the quantity, you'll get duplicates if you change the quantity or even delete the number.

We would need to know exactly how you plan to deal with chnages like that before we could offer any more suggestions.

Report •

September 8, 2009 at 22:56:43
Wow, I am more hopeless than I thought. I tried doing this but could not get it to work. Is there any good places to learn how to do macro programming. As I have a lot of this to do in the future?

Thank you for trying, but I do not have a grasp on this at this stage!!



Report •

Related Solutions

Ask Question