+ Reply to Thread
Results 1 to 2 of 2

IF logic_test=true, "how do I input text from the same table into another cell?"

  1. #1
    Registered User
    Join Date
    10-09-2006
    Posts
    1

    Question IF logic_test=true, "how do I input text from the same table into another cell?"

    OK, I've got a table with a column entitled 'Email Update' (from K2: K49). If an email update is needed, I input 1. If any of the cells in the column =1, I want to take the name and email address (cells B and L in the same row as the '1') and insert this text into 2 other cells in another tab within the same workbook.

    Is this possible? If so, please tell me. I'm going insane.

    Thanks

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,618
    Yes,
    1. copy the code below to the code module for the worksheet with the main table on it.
    2. Replace *name1 with the name of the main worksheet (with the table)
    3. Replace **name2 with the name of the worksheet you want the report to appear on
    4. Insert a command button from the forms toolbar on the main sheet and assign the macro to it.
    PHP Code: 
    Sub Update_Reporter()
              
    Dim iNdx As IntegeriStartRow As IntegeriLastRow As IntegeriCopyPointer As Integer

              iStartRow 
    2
              iLastRow 
    49
              iCopyPointer 
    1

              Sheets
    (*name1).Select
              
    For iNdx iStartRow To iLastRow
                        
    If Cells(iNdx"K").Value 1 Then
                                  Sheets
    (**name2).Cells(iCopyPointer1) = ActiveCell.Offset(0, -9).Value
                                  Sheets
    (**name2).Cells(iCopyPointer2) = ActiveCell.Offset(01).Value
                                  iCopyPointer 
    iCopyPointer 1
                        End 
    If
              
    Next iNdx
    End Sub 
    Ben Van Johnson

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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