Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How do I insert a calculated cell range into an excel function

I use the Vlookup function in Excel to extract information from different
parts of a csv file imported from another program. The problem that I have is
that I need to change the cell range in the Vlookup function each time I
import an updated file as the data will have moved depending on the size of
the file. I am able to automatically calculate what the cell references
should be, but cannot find a way to get these calculated references into the
function without keying them in directly, which is not practical.

I would be grateful for any help with this.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,355
Default How do I insert a calculated cell range into an excel function

When you say "calculate" the references, I'm guessing you mean that you have
a named range for those references.

Try using something like this:

=VLOOKUP(C1,'[Yourworkbook.xls]'!YourNamedRange,2)

"Gary Wallis" wrote:

I use the Vlookup function in Excel to extract information from different
parts of a csv file imported from another program. The problem that I have is
that I need to change the cell range in the Vlookup function each time I
import an updated file as the data will have moved depending on the size of
the file. I am able to automatically calculate what the cell references
should be, but cannot find a way to get these calculated references into the
function without keying them in directly, which is not practical.

I would be grateful for any help with this.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 72
Default How do I insert a calculated cell range into an excel function

If you want to avoid updating the range each time the data changes, you can
use the indirect function and using a calculated range.

An example of what this would look like:

Worksheet Name: "New Data"
Range: A1:B6

Country Units
USA 298
Germany 123
Brazil 456
Egypt 987
Japan 321

Worksheet Name: "Weekly Template"

Cell A1 Brazil
Cell A2 Egypt
Cell A3 Japan
Cell B1 =vlookup(a1,indirect(Calculated_Data_Range),2,fals e)
Cell B2 =vlookup(a2,indirect(Calculated_Data_Range),2,fals e)
Cell B3 =vlookup(a3,indirect(Calculated_Data_Range),2,fals e)


Worksheet Name: "Indirect References"
Cell A1 Calculated_Data_Range
Cell B1 'New Data'!$A$1:$B$6

In the Indirect References worksheet, highlight A1:B1, then from the Insert
menu, select Create, select Left Column to name B1 "Calculated_Data_Range".

In B1 of the Indirect References worksheet is where a formula to calculate
the range name would be for this example.

Let me know if this helps.

Peggy


"Gary Wallis" wrote:

I use the Vlookup function in Excel to extract information from different
parts of a csv file imported from another program. The problem that I have is
that I need to change the cell range in the Vlookup function each time I
import an updated file as the data will have moved depending on the size of
the file. I am able to automatically calculate what the cell references
should be, but cannot find a way to get these calculated references into the
function without keying them in directly, which is not practical.

I would be grateful for any help with this.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW TO INSERT A CALCULATED FIELD TO MY PIVOT TABLE EXCEL 2003 drhell Excel Discussion (Misc queries) 1 January 29th 07 10:51 PM
pivot tables - insert calculated field Hilda B. Charts and Charting in Excel 0 November 6th 06 08:20 PM
Pivot tables - Insert Calculated field nc Excel Discussion (Misc queries) 0 May 9th 06 09:35 AM
how to change a calculated cell to = the calculated value CAM Excel Discussion (Misc queries) 4 January 26th 06 05:26 PM
pethow do i insert a Yes/No function into a cell in Excel? petethomson Excel Discussion (Misc queries) 1 September 14th 05 05:11 PM


All times are GMT +1. The time now is 03:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"