Results 1 to 4 of 4

Macro for identifying text in reference cell and inserting a blank value in target cell

Threaded View

  1. #1
    Registered User
    Join Date
    10-22-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003
    Posts
    12

    Macro for identifying text in reference cell and inserting a blank value in target cell

    Hello. I hope somebody can lend some assistance and guidance with the correct VB coding because I have been going round in circles trying some of the basic codes on webinars/podcasts and they don't seem to work

    I have a Reference Cell (H2:I2) in which there is a drop down list with two options: 1/. "SALES INVOICE" OR 2/. "QUOTATION". This has been set via a simple Data Validation process.

    Cell I25 (the target cell) contains a simple formula in it "=(I22-I23+I24)*16%". It calculates Sales tax at 16% rate for the three rows above.
    Row I22 = the subtotal of purchased products
    Row I23 = any discounts to be deducted
    Row I24 = Any freight costs to be added.

    When the text "Sales Invoice" is selected in the Reference Cell (H2:I2) then all the formulas contained in each of the subsequent rows mentioned should automatically calculate various values.

    However if the text "Quotation" is selected in the Reference Cell then I need the macro to bypass the formula in I25 AND simply place the text "-----" ie. five space bars without deleting the formula "=(I22-I23+I24)*16%".

    Any ideas please - somebody - anybody out there who can shed some light. I really need some urgent assistance on this one.

    Thanks.
    Last edited by BillBakos; 10-28-2013 at 09:52 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Recoding macro to add all cells above a target cell until there is a blank row.
    By PatrickDC in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 10-22-2013, 06:56 AM
  2. How to have a cell return blank when the target cell it is copying is blank
    By DanielWinning in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-23-2013, 11:14 AM
  3. [SOLVED] Macro to change text colour of adjacent cell to the same text colour as target cell
    By kayoke in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-28-2012, 04:18 AM
  4. Need help inserting text into ever 7th (blank) cell.
    By deenix in forum Excel General
    Replies: 2
    Last Post: 08-26-2011, 03:17 PM
  5. Replies: 1
    Last Post: 02-19-2007, 04:52 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1