writing code off of column headings?

kenman

Board Regular
Joined
Jan 27, 2005
Messages
85
Hi All,

I am downloading spreadsheets with similar data but there are some that have more info (columns of data) than others. Because there are so many files it would take me forever (not really but it would sure seem like it):) to perform the computations that I am looking to do in each file.
I am trying to see if there is anyway to name a column based on its heading, and then call a specific cell (or group of cells in the column) to perform a function on it. Is this possible?
I.e.and this is a very simple example:
Column headings are Mon, Tues, Wed, Thurs, Fri. in some files and other files also have columns with Sat and Sun. Let's say there are 52 rows of data for a year covering each week.
Now let's say I want to get what is in the Monday column for week 30. Is there anyway I can name the cell that corresponds to that cell using the "Monday" heading on the spreadsheet and get what is in a specific row for each column? Or is there anyway to get the average for 4 rows of data in the Tuesday column for a specific time period?

I hope someone understands the question. Thanks in advance for any replies to this.

Kenman
 
Not quite sure what you mean. A couple of other excel mvps have answered this. Could you explain your post.
 
Upvote 0

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
kenman,

Sorry if that was a bit confusing. Damon linked into this thread from that one. This one appears to be nicely buttoned up. However, in the course of playing with the accept labels in formulas option I learned a few things about being able to use Years as column or row headings which was unexpected. Excel does not allow range names to be numbers (for obvious reasons) so it came as quite a surprise to me that under certain circumstances numbers will be accepted as column labels. So, since this information was somewhat germain to the subject in this thread as well, I posted a cross-link back into the other thread so that anyone perusing this one could see the additional info as well.

Sorry if that threw you for a bit of a loop.
 
Upvote 0

Forum statistics

Threads
1,216,109
Messages
6,128,880
Members
449,477
Latest member
panjongshing

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