+ Reply to Thread
Results 1 to 4 of 4

Adding Column after checking if the value exists or not

  1. #1
    Forum Contributor
    Join Date
    05-13-2019
    Location
    Halifax, Canada
    MS-Off Ver
    2016
    Posts
    176

    Adding Column after checking if the value exists or not

    Hi experts,

    I have a data ranging from Column A to Column BX.

    I am trying to insert a column M (which already has a data) and put the value "Gross Sales" in M4. The VBA code that I have created, however, adds the column all the time since the code is run for multiple times for updating other operations. I have the following code and want to put a check event which checks Column M if value "Gross Sales" is available or not. If it is available do nothing and if it is not then add Column M and set "Gross Sales" in Cell M4. I appreciate for codes that will stop addition if the value "Gross Sales" exist in Column M.

    Please Login or Register  to view this content.
    Thank you
    Roshan Shakya
    Last edited by Roshan.Shakya; 07-10-2019 at 12:23 PM. Reason: for clarity

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Adding Column after checking if the value exists or not

    Please Login or Register  to view this content.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Forum Contributor
    Join Date
    05-13-2019
    Location
    Halifax, Canada
    MS-Off Ver
    2016
    Posts
    176

    Re: Adding Column after checking if the value exists or not

    Thank you JLGWhiz.

  4. #4
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Adding Column after checking if the value exists or not

    Quote Originally Posted by Roshan.Shakya View Post
    Thank you JLGWhiz.
    You're welcome,
    regards, JLG

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Adding a Value to Column A when it Exists in Column B but not A
    By HCLax in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-16-2015, 03:27 PM
  2. Checking to see if a number exists in a column
    By smaier69 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-14-2013, 12:08 PM
  3. [SOLVED] checking file exists before adding hyperlink
    By TaliKL in forum Excel General
    Replies: 8
    Last Post: 03-02-2013, 06:26 AM
  4. Replies: 4
    Last Post: 01-31-2012, 04:07 PM
  5. Adding up values after checking a column
    By Cmorgan in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 11-04-2011, 03:18 AM
  6. Adding up averages after checking another column
    By Cmorgan in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 09-20-2011, 06:34 AM
  7. help with checking if dir or file exists
    By greenfalcon in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-08-2005, 03:03 PM

Tags for this Thread

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