Formulas & formatting

drluke

Active Member
Joined
Apr 17, 2014
Messages
314
Office Version
  1. 365
Platform
  1. Windows
Is there a way to make excel ignore formatting of data cells so that my formula will work.
The data is typed into the worksheet, however the format is General. My formula won't work unless the typed in value is preceded by apostrophe. Is there a way to solve this problem?

My formula is:

=IF(VLOOKUP(A33,GTN!A:C,3,0)="5522","50019",(VLOOKUP(A33,GTN!A:C,3,0)))
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
If I remove the inverted commas then I get 5522 as my result for those cells. That is not correct - the cells that have 5522 in them must be returned as 50015 in my formula result.
 
Upvote 0
The only way you can get 5522 for the result of the formula:

=IF(VLOOKUP(A33,GTN!A:C,3,0)=5522,"50019",(VLOOKUP(A33,GTN!A:C,3,0)))

is if your vlookup produced 5522 in a text form. If your result was just a number 5522 then you would get the result 50019 in text form.
 
Upvote 0

Forum statistics

Threads
1,215,471
Messages
6,124,999
Members
449,201
Latest member
Lunzwe73

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top