+ Reply to Thread
Results 1 to 2 of 2

Visual Basic in EXCEL

Hybrid View

  1. #1
    Registered User
    Join Date
    08-07-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    18

    Unhappy Visual Basic in EXCEL

    I have 4 columns of data namely ETD, FTD, GTD and HTD. These acronyms are entered in the header row of columns E,F,G ans H of the worksheet. Under these columns are 2000 rows of numbers.

    I have also created a new column in column I and it is called TD_to_use. The formula for this column is =MAX(E2:H2) where the row number will change for each row.

    Another column J, called TD_type should contain a macro to provide the header name of the row that has the maximum value. Hence if the number under ETD is highest of the E:H range, the macro will provide the answer ETD in the appropriate row of this column.

    How do I write this macro??

    A sample is attached.

    Raury
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Sadath31's Avatar
    Join Date
    03-02-2011
    Location
    Dammam, Saudi Arabia
    MS-Off Ver
    Office 365
    Posts
    452

    Re: Visual Basic in EXCEL

    3rd row formula will be =INDEX($A$1:$F$1,,MATCH(G3,A3:F3,0))

+ 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. Visual Basic and Excel
    By conspiringfate in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-21-2006, 10:10 AM
  2. [SOLVED] Can I run Visual Basic procedure using Excel Visual Basic editor?
    By john.jacobs71 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-26-2005, 10:25 AM
  3. Replies: 1
    Last Post: 09-13-2005, 07:06 AM
  4. Excel and Visual Basic
    By \remy khalil via OfficeKB.com\ in forum Excel General
    Replies: 1
    Last Post: 07-07-2005, 09:05 AM
  5. visual basic in excel -
    By DKehl in forum Excel General
    Replies: 2
    Last Post: 03-23-2005, 04:06 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