Imported TXT file vs Named Ranges

zapppsr

Board Regular
Joined
Aug 19, 2010
Messages
189
Hi.

I don't use imported TXT files much, but now I'm needing to do it.

I know how to import/link a TXT file in Excel, OK.

But I would like to create named ranges in the sheet that recieves the data, without needing to name the whole column. I tried creating a table, but it does not accept.

So, the only solution I think is naming the whole column. Is there a work around?

I made a picture to better express what I'm trying to do...

Sorry to post a link, but at my office I can't put images in posts, some firewal restriction i guess.

Image llink:

http://6392644737045821432-a-180274...lAxMv1uq9GDvsNKgVUaeIJ5FGgtQ==&attredirects=0
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Try this. I've had success with this in the past.

Create a named range say "TEXT".
When you define the named range instead of defining the whole column
define it like this =Sheet1!$A1

Note the reference to the row is relative instead of absolute. It refers to whatever is in column A but on the line you are working on so that if you are on line15 and in column P and you type a formula like =text you get the text value in A15

Copy this formula to H17 you'll get the text value that is in cell A17

Try it and see if it works.
 
Upvote 0
Thanks for the answer.

I don't want the last value... I want the range.

If I have this dataset:

A
1 = City 1
2 = City 1
3 = City 1
4 = City 2
5 = City 2
6 = City 1
7 = City 1

I want to count how many City 1 is on column A.

If my name range goes from A1:A5, it will return 3.

If the range expands to A1:A7, and the name not, it would give me 3 instead of 5.

My problem is no dynamic ranges out of tables...
 
Upvote 0

Forum statistics

Threads
1,224,552
Messages
6,179,486
Members
452,917
Latest member
MrsMSalt

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