Computing.Net > Forums > Office Software > Excel formula/Macro

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Excel formula/Macro

Reply to Message Icon

Name: gthubba
Date: August 27, 2009 at 05:56:38 Pacific
OS: Microsoft Windows XP Professional
CPU/Ram: 1.828 GHz / 1015 MB
Product: Hewlett-packard / Hp 530 notebook pc(kd096aa#abg)
Subcategory: Microsoft Office
Tags: excel, vlookup
Comment:

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.

Trent



Sponsored Link
Ads by Google

Response Number 1
Name: DerbyDad03
Date: August 27, 2009 at 06:53:50 Pacific
Reply:

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.


0

Response Number 2
Name: gthubba
Date: September 8, 2009 at 22:56:43 Pacific
Reply:

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!!

Cheers,

Trent


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Excel formula/Macro

Excel worksheets / Macros www.computing.net/answers/office/excel-worksheets-macros/8832.html

Excel Formula Help www.computing.net/answers/office/excel-formula-help/2797.html

Problems with Excel Formulas www.computing.net/answers/office/problems-with-excel-formulas/5502.html