Indirect formula not working

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,347
Office Version
  1. 365
Platform
  1. Windows
I am using an indirect formula to pull data of other tabs. The tab names are compiled and placed on a tab through VBA code (pretty much a cut and paste)

My problem is that the formula is not calculating because what I am assuming is the format of the data in column B.

If I type over the data (exactly the same) the formula works. I know its not mispelling because the code is using a formula to pull the tab nam in.

Anyone run into this problem and came up with a solution?

=IF(ISERROR(INDIRECT($B2&"!U2")),"",INDIRECT($B2&"!U2"))

PS the format of the Text in Column B is "General" and yes I tried changing the format of the names to Text, Number......

Thanks for the help!
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Does the text in column B contain spaces? If so, you need an apostrophe within your INDIRECT function. Or you could combine it with ADDRESS. Something like this maybe:
INDIRECT(ADDRESS(2,21,,,$B2))
 
Upvote 0
I am using an indirect formula to pull data of other tabs. The tab names are compiled and placed on a tab through VBA code (pretty much a cut and paste)

My problem is that the formula is not calculating because what I am assuming is the format of the data in column B.

If I type over the data (exactly the same) the formula works. I know its not mispelling because the code is using a formula to pull the tab nam in.

Anyone run into this problem and came up with a solution?

=IF(ISERROR(INDIRECT($B2&"!U2")),"",INDIRECT($B2&"!U2"))

PS the format of the Text in Column B is "General" and yes I tried changing the format of the names to Text, Number......

Thanks for the help!
Are you sure there are no unseen whitespace characters in the cell before you over write it?

Does this make a difference:

=IF(ISERROR(INDIRECT(TRIM($B2)&"!U2")),"",INDIRECT(TRIM($B2)&"!U2"))
 
Upvote 0
You're probably right. I will check it now. There are spaces and that is most likely whats happening. The one that I chose to "write" over did not have any spaces.

THANKS
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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