Results 1 to 4 of 4

Create Sub routine that translates values

Threaded View

wwconslt Create Sub routine that... 04-17-2018, 10:02 AM
CK76 Re: Create Sub routine that... 04-17-2018, 10:08 AM
wwconslt Re: Create Sub routine that... 04-17-2018, 10:11 AM
CK76 Re: Create Sub routine that... 04-17-2018, 10:25 AM
  1. #1
    Registered User
    Join Date
    01-26-2015
    Location
    Massachusetts
    MS-Off Ver
    2016
    Posts
    73

    Create Sub routine that translates values

    We’re using a complicated macro to clean and format data into several sheets. I’d like to add the following functionality to the existing macro using vba. I’d like to accomplish this functionality solely in the VBA code and not have to use another sheet or copy additional columns and rows with the values. I would like to accomplish this using and IF THEN ELSE statement in the vba code.

    IF B2 = “Giving” and D2 = “general fund” then D2 changes to 0501
    ELSE IF
    B2 = “Giving” and D2 = “global fund” then D2 becomes 0502
    ELSE IF
    B2=”Giving” and D2 =”” then D2 becomes 0501
    ELSE IF
    B2 =”Athletics” and D2 = “Friends of Athletics” then D2 becomes 0601
    ELSE IF
    B2 =”Athletics” and D2 = “” then D2 becomes “”
    Etc.
    I’ll have about 20 different options I’ll add.

    Thanks for your help.
    Last edited by wwconslt; 04-17-2018 at 10:12 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Sub routine For Making Directories if not exisisting create
    By COURTTROOPER in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-22-2017, 06:35 AM
  2. HELP! Can't correctly create Find & Replace macro routine for Word doc
    By staggers47 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2012, 09:51 PM
  3. Routine to create navigation buttons
    By allanr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-21-2008, 04:30 AM
  4. Excel crashes when I create code through a routine
    By Caligula in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-20-2007, 03:55 PM
  5. Create a range that translates to a numeric value?
    By swaddock in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 07-06-2007, 10:57 AM
  6. How to create a routine
    By Tara in forum Excel General
    Replies: 1
    Last Post: 08-11-2005, 10:05 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