+ Reply to Thread
Results 1 to 9 of 9

I want to change a text reference to a cell reference but im getting #N/A

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-26-2013
    Location
    Orlando
    MS-Off Ver
    Excel 2016
    Posts
    191

    I want to change a text reference to a cell reference but im getting #N/A

    The formula im using works like a charm until i change the text reference for "43" to a cell reference which updates using the =weeknum formula. What do i need to add here?

    =INDEX('Online sales'!$B$2:$F$9,MATCH("Alabama",'Online sales'!$A$2:$A$9,0),MATCH("43",'Online sales'!$B$1:$F$1,0))

    Thanks in advance!

  2. #2
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: I want to change a text reference to a cell reference but im getting #N/A

    so this doesn't work (with 43 being a number)?

    =INDEX('Online sales'!$B$2:$F$9,MATCH("Alabama",'Online sales'!$A$2:$A$9,0),MATCH(43,'Online sales'!$B$1:$F$1,0))

    otherwise,
    if you want to keep the weeknum formula as a text output, you could for instance wrap it in TRIM() or ""&WEEKNUM(), etc; somehow convert the number to text...

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: I want to change a text reference to a cell reference but im getting #N/A

    If that formula works that means the data in Online sales!$B$1:$F$1 are TEXT numbers.

    The best thing to do is change those values to numeric numbers.

    Are they results of formulas?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Contributor
    Join Date
    04-26-2013
    Location
    Orlando
    MS-Off Ver
    Excel 2016
    Posts
    191

    Re: I want to change a text reference to a cell reference but im getting #N/A

    Right both of these points make sense but what im ultimately trying to do is make the 43 a dynamically changing number based on a cell reference that will change each week. I do see how im referencing text and i should format as numbers in the instance above but that is not my goal. Thanks for the reply.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: I want to change a text reference to a cell reference but im getting #N/A

    Then you have to convert the value of the cell reference to be a text number.

    Something like this:

    =INDEX('Online sales'!$B$2:$F$9,MATCH("Alabama",'Online sales'!$A$2:$A$9,0),MATCH(A1&"",'Online sales'!$B$1:$F$1,0))

  6. #6
    Forum Contributor
    Join Date
    04-26-2013
    Location
    Orlando
    MS-Off Ver
    Excel 2016
    Posts
    191

    Re: I want to change a text reference to a cell reference but im getting #N/A

    Quote Originally Posted by Tony Valko View Post
    Then you have to convert the value of the cell reference to be a text number.

    Something like this:

    =INDEX('Online sales'!$B$2:$F$9,MATCH("Alabama",'Online sales'!$A$2:$A$9,0),MATCH(A1&"",'Online sales'!$B$1:$F$1,0))
    Not sure what you did but this seems to have worked. thanks a bunch!

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: I want to change a text reference to a cell reference but im getting #N/A

    We concatenated an empty text string to the cell reference. If the cell reference contained a numeric number this concatenation changes that to a TEXT value.

    For example:

    10 = numeric number

    10&"" = 10 as a TEXT value

    In Excel TEXT numbers are not the same as numeric numbers.

+ 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. Indirect Sheet reference with cell reference left function and text
    By teststrip in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-01-2015, 10:31 AM
  2. Replies: 1
    Last Post: 02-11-2015, 01:56 PM
  3. [SOLVED] How to reference Timevalue to change a cell's text to another text
    By gutchek in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-17-2014, 02:44 PM
  4. Dragging formula, change sheet reference, but not cell reference
    By Kalilaya0419 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-13-2013, 04:50 PM
  5. Replies: 2
    Last Post: 10-08-2012, 08:10 AM
  6. [SOLVED] How to change cell reference to text?
    By jasondu in forum Excel General
    Replies: 2
    Last Post: 06-11-2012, 04:47 PM
  7. [SOLVED] text color change in cell reference
    By TomKat743 in forum Excel General
    Replies: 3
    Last Post: 06-15-2005, 08:05 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