+ Reply to Thread
Results 1 to 6 of 6

array formula - ignore part of string

  1. #1
    Registered User
    Join Date
    07-30-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    3

    Arrow array formula - ignore part of string

    I have this in my excel worksheet. I need to display specific charge for a specific place.
    This is my sheet looks like.

    Column A
    A1: PLACE1
    A2: PLACE2
    A3: PLACE3

    COLUMN B
    B1: ADRESS PLACE1
    B2: ADRESS PLACE2
    B3: ADRESS PLACE3

    COLUMN C
    C1:CHARGE1($1)
    C2:CHARGE2($2)
    C3:CHARGE3($3)

    COLUMN D
    D1: INPUT PLACE

    COLUMN E
    E1: INPUT PLACE

    COLULM F
    F1: DISPLAY THE CHARGE

    here is my working formula:
    COLUMN F
    F1:
    {=INDEX($C$1:$C$3,MATCH(1,(E1=$A1:$A3)*(F1=$B$1:$B$3),0))}

    here goes the problem..

    sometimes when certain place is inputed in column E has the word "CITY"..if that happens, my formula does work anymore...my formula only works if you input place that is exactly the same spelling/spaces in column A. hope you get what i mean...thanks in advance.

    please see attachment..thanks
    Attached Files Attached Files
    Last edited by jonijay78; 07-30-2010 at 04:53 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    08-31-2007
    Location
    SW Ireland
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2311 Build 16.0.17029.20068) 32-bit
    Posts
    540

    Re: need array formula for my report

    Could you use data validation for the user input cells so that they only choose the correct names from a dropdown list rather than type in the place name?
    Excel 365 user. To unblock a downloaded macro-enabled workbook, go to your "Downloads" folder > right click on the workbook name > click 'Properties' > check the 'Unblock' checkbox. You can now open the workbook.

  3. #3
    Registered User
    Join Date
    07-30-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    3

    Arrow Re: need array formula for my report

    Quote Originally Posted by deadlyduck View Post
    Could you use data validation for the user input cells so that they only choose the correct names from a dropdown list rather than type in the place name?
    nope because this is already typed in a separate sheet....ill just have to paste to formula to display the rates. the problem is not all town is typed with or without the word "city"

  4. #4
    Registered User
    Join Date
    07-30-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: need array formula for my report

    anyone? please..

  5. #5
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: need array formula for my report

    try

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    07-15-2010
    Location
    California, United States
    MS-Off Ver
    Excel 2010
    Posts
    45

    Re: array formula - ignore part of string

    non-array formula
    =SUMPRODUCT(--($A$2:$A$539=VLOOKUP(IF(MID(E2,LEN(E2)-LEN("city")+1,4)="CITY",LEFT(E2,LEN(E2)-LEN("city")-1),E2),$A$2:$A$539,1,FALSE)),--($B$2:$B$539=VLOOKUP(F2,$B$2:$B$539,1,FALSE)),$C$2:$C$539)

+ 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