Removing double quotes around strings returned by formulae

Copper Contributor

I've constructed a cell range using concatenate which works fine except that when it is returned, Excel sticks double quotes around them and my match function fails.

I've tried trim&substitute. I've tried putting the function into a cell and removing the function to make it the actual value. nothing works. 

Any suggestions please?

e.g. Concatenate("D","35",":","D","42") is displayed as D35:D42 in excel but returns "D35:D42" as the parameter of Match. 

7 Replies

@kimbo1160 

 

Not sure about this, but it looks to me as if what might want is =INDIRECT("D35:D42")

 

Try that. If it's not what you're seeking, come back with an example spreadsheet and a more complete description.

thanks Mathetes. Looks like that's worked. you're a life saver :)

@kimbo1160 

hi , i have the same problem, i couldn't solve it with indirect !! 

any suggestions plz ?

@its_the_wil 

 

hi , i have the same problem, i couldn't solve it with indirect !! 

any suggestions plz ?

 

It's probably not the same problem then, wouldn't you think? So let's start with a more complete description of whatever the problem is that you're experiencing. And, if it's possible--if your spreadsheet doesn't contain confidential or proprietary info--please post a copy of the spreadsheet itself in OneDrive or GoogleDrive and paste a link here that grants edit access.

@mathetes 

=COUNTIFS(StaffTBL[Position],"Head Teacher",StaffTBL[Gender],"MALE",StaffTBL[Dec-2022],"Active")

StaffTBL: Table Name

Position, Gender, Dec-2022: Columns Name

i want to change the selection of the month column according to the current month ..so , i have column for months (Sep-2022,Oct-2022,.....Jul-2023) , i  used countifs as shown above and i tried to change month column dynamically by using Hlookup formula inside countifs formula , and it worked ,but when the Hlookup brings column name  it keeps put hidden quotes ("" "") at first and end of column name, if U use hlookup separately it will bring correct column name but when i put it inside countifs it brings column name as  "StaffTBL[Dec-2022]"

@its_the_wil 

=COUNTIFS(StaffTBL[Position],"Head Teacher",StaffTBL[Gender],"MALE",StaffTBL[Dec-2022],"Active")

<snip>...</snip>

i  used countifs as shown above and i tried to change month column dynamically by using Hlookup formula inside countifs formula

 

There is no HLOOKUP evident in that COUNTIFS formula.

 

So I repeat:  if it's possible--if your spreadsheet doesn't contain confidential or proprietary info--please post a copy of the spreadsheet itself in OneDrive or GoogleDrive and paste a link here that grants edit access.

 

Let me expand on that: if your actual spreadsheet does contain confidential or proprietary info, then create a copy that uses names of Star Wars or Disney characters, but still is representative of your actual. And post that mockup  in OneDrive or GoogleDrive and paste a link here that grants edit access.

In addition to mathetes comments above I would like to add that this should be a NEW post. The original post was solved.
As for your issue we need to see what you tried. I'm not sure what HLOOKUP returned "StaffTBL[Dec-2022]" I think you want your HLOOKUP to return the column header name and then put that inside the [ ] but that might be easier using INDEX( MATCH ()) or if you have Excel 365 then just use XLOOKUP. But maybe try something like:
=COUNTIFS(StaffTBL[Position],"Head Teacher",StaffTBL[Gender],"MALE",StaffTBL[ INDEX(StaffTBL[#Headers], MATCH( ... ) ) ],"Active")