Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Jamie
 
Posts: n/a
Default Adjusting a formula cell range

I have a formula that uses cells D2:D20, the problem is the info that it is
using is updated through a query, so I might need the range to be D2:D30, if
I set the range to larger than what i need it causes an error in the formula,
is there a way to make excel recognize whether there is a value in the cell
or not and include it in the formula range so the formula range floats with
the data that arrives through the query.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
Daniel CHEN
 
Posts: n/a
Default Adjusting a formula cell range

Use the following to create a dynamic range:

OFFSET(D2,0,0,COUNT(D2:D99),1)

Replace D2:D20 in your formula with the above dynamic range.
99 can be changed to any big number.

--
Best regards,
---
Yongjun CHEN
=================================
XLDataSoft - Data Analysis Expert, Excel/VBA Specialist
- - - - www.XLDataSoft.com - - - -
Free Excel-Based Data Processing Tool is Available for Download
Free Excel / VBA Training Materials is Available for Download
=================================

"Jamie" wrote in message
...
I have a formula that uses cells D2:D20, the problem is the info that it is
using is updated through a query, so I might need the range to be D2:D30,
if
I set the range to larger than what i need it causes an error in the
formula,
is there a way to make excel recognize whether there is a value in the
cell
or not and include it in the formula range so the formula range floats
with
the data that arrives through the query.

Thanks



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
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Conditional Format - Formula to Colour Every 3rd Cell in Offset Range Sam via OfficeKB.com Excel Discussion (Misc queries) 7 August 13th 05 04:19 AM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM


All times are GMT +1. The time now is 04:08 PM.

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

About Us

"It's about Microsoft Excel"