+ Reply to Thread
Results 1 to 5 of 5

ActiveCell. Value

  1. #1
    Registered User
    Join Date
    12-19-2021
    Location
    London
    MS-Off Ver
    2010
    Posts
    9

    ActiveCell. Value

    I have question.

    If any (row/column) that cell, enter =orange22("thisis")

    is it possible near that cell : a column+1 , show this ?

    example: that D5 enter =orange22("thisis"), that script show result E5

    but not work?

    Thanks.


    Module1:
    Option Explicit

    Public Function orange22(ByVal inputText As String) As String


    'Range(CStr(Chr(64 + ActiveCell.Column + 1)) & CStr(ActiveCell.Row)).Value = "new" & inputText

    orange22 = inputText & "<<"


    End Function

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: ActiveCell. Value

    No. A UDF can only return a result to the cell it is in. It cannot affect other cells.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    12-19-2021
    Location
    London
    MS-Off Ver
    2010
    Posts
    9

    Re: ActiveCell. Value

    Thanks , If need User-defined functions to show that result to other cell, is it possible?

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: ActiveCell. Value

    No. You could probably use a Worksheet Change Event handler to monitor one or more cells and, if one of them changes, output a result to a different cell.

    What are you trying to achieve?

  5. #5
    Registered User
    Join Date
    12-19-2021
    Location
    London
    MS-Off Ver
    2010
    Posts
    9

    Re: ActiveCell. Value

    thanks, I need doing this result: example:

    A1 =orange22("aaaa\bbb\ccc\cddd"). use split "\" to array
    after enter, show this result:

    B1.value = aaaabbb

    C1.value = ccc
    FillColor = ColorIndex = 35

    D1.value = ddd
    that D1 cell:
    .Bold


    is it VBA, UDF to completed that?
    Last edited by iviv594; 12-19-2021 at 09:00 AM.

+ 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. difference in between activecell.activate and activecell.select
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-08-2020, 03:14 AM
  2. Copying an activecell range and pasting to another activecell range
    By Londonbound in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-12-2014, 07:41 AM
  3. [SOLVED] copy rows with activecell value and insert rows after activecell
    By a.hudrea in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-21-2014, 09:05 AM
  4. Selecting Activecell and cell next to the Activecell
    By Raghukumarn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-31-2013, 06:32 AM
  5. Output contents of Activecell when Activecell may be string or numeric.
    By jfriddle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2012, 12:27 PM
  6. How to use Activecell.Value = name
    By easty in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-01-2010, 04:18 AM
  7. How to set the Activecell of "Sheet2" to Activecell of "Sheet1"
    By shawnh in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-06-2010, 11:12 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