Results 1 to 4 of 4

[SOLVED] Newbie syntax issue

Threaded View

  1. #1
    Registered User
    Join Date
    08-03-2019
    Location
    Illinois
    MS-Off Ver
    Mac 14.7.7
    Posts
    17

    [SOLVED] Newbie syntax issue

    Hi,

    I'm trying to write a script that will check a column of cells for a carriage return and then perform an operation and paste that new values into the cells in the next column. Currently I'm just working on doing the simplest version of this with trying it or one cell. I'm trying to get the variable "reformatB" to get assigned a new value based on the calculation below and then display it in a message box. I've tried with and without quotes and many other things but the message box just displays the actual string inside the quote marks rather than evaluating what's inside the quote marks. What am I do wrong? Thanks in Advance.

    Sub test()
    v = Range("B1").Value
    Dim reformatB As Variant
    If InStr(1, v, Chr(10)) > 0 Or InStr(1, v, Chr(13)) > 0 Then

    reformatB = "=(LEFT(B1, Find(CHAR(10), B1) - 1)),B1))"
    MsgBox reformatB
    Else
    MsgBox "no return"
    End If


    I also tried reformatB = "=EVAL(LEFT(B1, Find(CHAR(10), B1) - 1)),B1))" and that did not work either. Thx.
    Last edited by Jadee77; 08-03-2019 at 05:29 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Randbetween issue - Excel newbie!
    By g_hughes in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-14-2018, 09:25 AM
  2. [SOLVED] newbie - simple import - what could be issue?
    By hmm321 in forum Excel General
    Replies: 2
    Last Post: 07-22-2013, 01:41 AM
  3. Newbie Solver issue:
    By luclim in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-27-2013, 03:26 PM
  4. syntax issue.
    By bopsgtir in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-04-2012, 09:35 PM
  5. [SOLVED] Syntax Issue
    By Vladamir in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-30-2012, 10:36 AM
  6. syntax issue
    By JT in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-05-2006, 04:10 PM
  7. Newbie syntax question
    By Nodles in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-20-2006, 11:15 AM

Tags for this Thread

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