• 0

Excel 2003 Macro Problem


Question

Hi,

I am creating a spreadsheet that allows a user to update information from a form on one sheet to another sheet, called 'Store Records'

e.g.:

Add Sale Form:

Product Name

Product Price

Product Quantity:

And then below that, I get how many of the item is currently in stock (from a cell in the store records sheet) and then take it away from what is entered in the 'Product Quantity:' field above. And then another one that gets how many have been sold (from a cell in the store records sheet) and then adds again what was entered into the 'Product Quantity:' above.

In the store records sheet, I have:

Product Name Product Price Quantity In Stock Quantity Sold

What I want to do is get the values from the add sale form and update the records held in the store records sheet above, using a macro. However, when I do that, it will only update the one I have selected when recording the macro, so if I select another product, it will not go to the correct product line.

Anyone got any ideas on how to resolve this?

thanks!

Link to comment
https://www.neowin.net/forum/topic/745678-excel-2003-macro-problem/
Share on other sites

5 answers to this question

Recommended Posts

  • 0

See Attached Excel Worksheet

Coding isnt "Perfect" as it uses exact reference to a sheet number, but does what is being asked.

Keep in mind there are two named ranges in the sheet; Products and Stock both on the "stock" sheet and the dropdown on the order form is control by the range products. So if you add a product it will update the range and dropdown.

Order.zipFetching info...

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Clearly a lot of gamers. And I'm sorry but you are wrong, my 7800x3d (single ccd) offers huge benefits to me as a AAA 1440p gamer. And it's pretty dumb to crap on 1080p gamers as they make up like 90+% of steam gamers. But no, the x3d does not just offer benefits to esport gamers (one of the stupidest things I've seen in a while AND THATS SAYING SOMETHING.) Abd when I built my rig with my 7800x3d, I paired it with a RX7900xt and couldn't be happier.
    • Popular File Explorer alternative Files gets signature check, improved dual-pane, and more by Taras Buria A new update has arrived for File Preview, a feature-packed file manager for Windows 10 and 11. Version 3.9.14 introduces a useful new feature for file properties, dual-pane improvements, the ability to resize columns in the Columns View, and more. Starting with the Properties dialog, it now features a "Signatures" tab where you can view digital signatures associated with the file and their properties, such as version, issuer, expiry date, and more. You can also click the "Details" button to open Windows' native dialog. The dual-pane feature has been tweaked for a more intuitive experience. The "Add pane" command is now "Split pane." There is a new quick action for toggling dual-pane mode on or off, and settings now have a dedicated section for dual-pane mode. Finally, columns in the Columns View are now resizable, and search results now have a header with your current query. In addition to releasing the update, developers said the following regarding performance complaints from users: Files Preview is available in the Microsoft Store. You can purchase it there to support developers. Alternatively, you can get the app for free from the official website, and if you want to help developers with contributions or ideas, check out their Discord and GitHub.
    • So the iPhone only has a leading position in a few markets around the world: US, UK, UAE, couple of other smaller ones. As a result of the far more mixed eco-system Whatsapp is a lot more popular outside of the US than I think a lot of American's may realise. It's pretty much the messaging standard in the UK
  • Recent Achievements

    • Week One Done
      searchwayus earned a badge
      Week One Done
    • First Post
      kryptickid earned a badge
      First Post
    • First Post
      Nemesis-IV earned a badge
      First Post
    • First Post
      Aidan Helfrich earned a badge
      First Post
    • Collaborator
      bullgod69 earned a badge
      Collaborator
  • Popular Contributors

    1. 1
      +primortal
      760
    2. 2
      ATLien_0
      187
    3. 3
      +FloatingFatMan
      151
    4. 4
      Xenon
      117
    5. 5
      wakjak
      113
  • Tell a friend

    Love Neowin? Tell a friend!