+ Reply to Thread
Results 1 to 3 of 3

Read the 2nd, 3rd, and 4th characters of: "Format>Cells>Number>Custom" Set at " MAR "0

  1. #1
    Registered User
    Join Date
    04-11-2013
    Location
    Englewood, FL
    MS-Off Ver
    Excel for Mac V16.19
    Posts
    11

    Read the 2nd, 3rd, and 4th characters of: "Format>Cells>Number>Custom" Set at " MAR "0

    Cell J4 has "Format>Cells>Number>Custom" Set at " MAR "0
    When I enter the number 2 into Cell J4 it dutifully reads (minus the exclamation marks): " MAR 2"
    I want to 'read' the 2nd, 3rd, and 4th characters of J4 yielding (minus the exclamation marks): "MAR"
    Why?
    Using an If Statement in Cell S45 I want to read the 2nd, 3rd, and 4th characters of J4 (3-letter abbreviation for month),
    then having read the 3-letter abbreviation place the month full name in Cell S45.
    =If(2nd, 3rd, and 4th characters of J4 = "JAN", "JANUARY",If(2nd, 3rd, and 4th characters of J4 = "FEB", "FEBRUARY", and so on thru the 12 months,"???")))))))))))

    I'm guessing in Excel there is neater way to accomplish same objective. The method above, if possible, and although maybe more cumbersome; works for me... given 'reading' the 2nd, 3rd, and 4th characters of J4 is possible.

    I always end my If statements acting on text with: ,"???") This alerts me if I've made a typo in J4, I get "alerted" when S45 displays (minus the exclamation marks): "???"

    Thanks,

    _Andy L
    Attached Files Attached Files
    Last edited by AndyL446; 01-27-2020 at 11:38 PM. Reason: trying to add Sample Workbook

  2. #2
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Read the 2nd, 3rd, and 4th characters of: "Format>Cells>Number>Custom" Set at " MAR "0

    Worksheet function can't read format and display text and you have to use UDF or macro function. But the best way to keep date 03/01/YYYY in the cell and use МММ D формат.
    in the name
    GetTextcell :
    Please Login or Register  to view this content.
    Or UDF
    Please Login or Register  to view this content.
    Macro must be enabled!
    Attached Files Attached Files
    Last edited by BMV; 01-28-2020 at 05:16 AM.

  3. #3
    Registered User
    Join Date
    04-11-2013
    Location
    Englewood, FL
    MS-Off Ver
    Excel for Mac V16.19
    Posts
    11

    Re: Read the 2nd, 3rd, and 4th characters of: "Format>Cells>Number>Custom" Set at " MAR "0

    SOLVED! Not the prettiest way, but SOLVED.
    Where there was one (1) column and Cell J4 Custom Number Format was " MAR "0
    I added another column and split:
    One column contains only 3-letter month abbreviation: MAR
    and the added column contains only the date number: 2

+ 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. Replies: 1
    Last Post: 05-15-2019, 07:43 AM
  2. Replies: 5
    Last Post: 02-05-2019, 12:03 AM
  3. Replies: 2
    Last Post: 07-13-2018, 11:52 PM
  4. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  5. [SOLVED] Convert from "general" (YYYYMMDD) to specific "custom" format (YYYY.MM.DD)
    By Ella_p in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-10-2013, 02:23 AM
  6. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  7. Replies: 2
    Last Post: 11-01-2012, 04:35 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