Formula ? Trying not to use " "

zone709

Well-known Member
Joined
Mar 1, 2016
Messages
2,125
Office Version
  1. 365
Platform
  1. Windows
Hi I am trying to avoid using "Data "

I need to use Data! without the "". Is there a way to do these formulas different and work the same way. Maybe not using the indirect way. Reason cause I ahev to switch the sheet name sometimes and the " " mess it up thanks

=INDIRECT("Data!$E$2")

=IF(SUM(INDIRECT("Data!E"&(INT((ROW()-4)/7)+4)&":G"&(INT((ROW()-4)/7)+4)))=0,"",SUM(INDIRECT("Data!E"&(INT((ROW()-4)/7)+4)&":G"&(INT((ROW()-4)/7)+4))))
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi I am trying to avoid using "Data "

I need to use Data! without the "". Is there a way to do these formulas different and work the same way. Maybe not using the indirect way. Reason cause I ahev to switch the sheet name sometimes and the " " mess it up thanks

=INDIRECT("Data!$E$2")

=IF(SUM(INDIRECT("Data!E"&(INT((ROW()-4)/7)+4)&":G"&(INT((ROW()-4)/7)+4)))=0,"",SUM(INDIRECT("Data!E"&(INT((ROW()-4)/7)+4)&":G"&(INT((ROW()-4)/7)+4))))
As long as you are hard-coding the sheet name into the formula, you can use the INDEX function instead of the INDIRECT function...

=INDEX(Data!E:E,2,)

=IF(SUM(INDEX(Data!E:G,(INT((ROW()-4)/7)+4),))=0,"",SUM(INDEX(Data!E:G,(INT((ROW()-4)/7)+4),)))
 
Upvote 0
Type the name of the sheet, in this case Data, into a blank cell, let's say A1
Then change the formula and replacing all instances of "Data (note the one double quote) with A1&" (note the double quote)

When you need to change the sheet name, just type a new value into A1
 
Upvote 0
Type the name of the sheet, in this case Data, into a blank cell, let's say A1
Then change the formula and replacing all instances of "Data (note the one double quote) with A1&" (note the double quote)

When you need to change the sheet name, just type a new value into A1
What about including apostrophes just in case the new sheet name has spaces in it?
 
Upvote 0
ok this formula works as I been testing. When I add other sheet name called Data (2). It puts this in already

=INDEX('Data (2)'!E:E,2,)<strike></strike>

So this is great. Was having issue when I had it " ". Thanks for all the replys
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

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