+ Reply to Thread
Results 1 to 2 of 2

Is there a way to simplify this "Simple If Command"

  1. #1
    Registered User
    Join Date
    01-26-2019
    Location
    Colombia
    MS-Off Ver
    2017
    Posts
    16

    Question Is there a way to simplify this "Simple If Command"

    Hi everybody, im looking for a way to simplify this command, i have a list that i wish to check for "T5", and if "T5" is indeed in the list, to check results in the Ranges (AB5+), and if exist then put the data from (AC5+)

    Sheets("Mercantil").Select
    If Range("T5") = Range("AB5") Then
    Range("T5") = Range("AC5")
    End If
    If Range("T5") = Range("AB6") Then
    Range("T5") = Range("AC6")
    End If

    i mean like this command works and haves been helpfull but im going to add at least 100 more cells of information and i want a way to improve this command

    Cant post the worksheet since it was clients and work sensitive information

    thanks in advance!!
    Last edited by Miguelhn94; 09-18-2019 at 01:33 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Is there a way to simplify this "Simple If Command"

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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. Replies: 6
    Last Post: 08-25-2019, 12:41 AM
  2. [SOLVED] is there any way to simplify this command ActiveSheet.Shapes("Drop Down 1154")
    By Miguelhn94 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-02-2019, 08:55 PM
  3. Creating a "difficult" or "simple" bar chart
    By NLatuny in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 03-24-2016, 01:20 PM
  4. Adding "Command Button" and "Messages Box" in VBA Macro
    By sanjeevkumarmc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-09-2014, 07:21 AM
  5. Create a Command Button to "Save As" and "Close" an Excel Workbook
    By thedunna in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-26-2013, 05:38 PM
  6. How to change a Command Button caption from "Enable" to "Disable"?
    By Infinity in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-22-2007, 12:14 AM
  7. [SOLVED] inserting a conditional "go to" command on a excel "if" function
    By velasques in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-10-2006, 04:20 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