Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 273
Default Expanding on a previous post



"Murray" wrote:

On Jan 30, 3:31 pm, Chad wrote:
I have a workbook that in Sheet3 has a cell with the following formula
=IF(ISBLANK(Sheet1!$A$16),"-",Sheet1!$A$16)

Anyway if I delete row 16 on Sheet 1 and everything else shifts up then this
formula becomes

=IF(ISBLANK(Sheet1!#REF!),"-",Sheet1!#REF!)

Is there anyway to prevent this and make it just pull the data that is now
in Sheet1 A16


You could try using the OFFSET function:

=IF(ISBLANK(OFFSET(Sheet1!A1,15,0)),"-",OFFSET(Sheet1!A1,15,0))

The OFFSET function takes a reference position and then specifies a
number of rows and columns to offset from ie in this case, from cell
A1 offset 15 rows down and zero rows across. Doing it this way allows
you to delete rows and it should still be OK.

HTH

Murray



OK Your OFFSET idea worked wonders on my first workbook but know I have
another one and the same thing need to be done but there are over a 1000
cells i need to change. Is there a macro I could right to find a reference
and change it to the corresponding OFFSET function.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 211
Default Expanding on a previous post

remove $ from $A$16, then it will work.
$ makes the address absolute.

"Chad" wrote:



"Murray" wrote:

On Jan 30, 3:31 pm, Chad wrote:
I have a workbook that in Sheet3 has a cell with the following formula
=IF(ISBLANK(Sheet1!$A$16),"-",Sheet1!$A$16)

Anyway if I delete row 16 on Sheet 1 and everything else shifts up then this
formula becomes

=IF(ISBLANK(Sheet1!#REF!),"-",Sheet1!#REF!)

Is there anyway to prevent this and make it just pull the data that is now
in Sheet1 A16


You could try using the OFFSET function:

=IF(ISBLANK(OFFSET(Sheet1!A1,15,0)),"-",OFFSET(Sheet1!A1,15,0))

The OFFSET function takes a reference position and then specifies a
number of rows and columns to offset from ie in this case, from cell
A1 offset 15 rows down and zero rows across. Doing it this way allows
you to delete rows and it should still be OK.

HTH

Murray



OK Your OFFSET idea worked wonders on my first workbook but know I have
another one and the same thing need to be done but there are over a 1000
cells i need to change. Is there a macro I could right to find a reference
and change it to the corresponding OFFSET function.

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
VBA Link - Previous post unclear robert morris Excel Discussion (Misc queries) 9 May 1st 08 10:57 PM
Correction to previous post Dave Thomas Excel Worksheet Functions 0 July 16th 07 09:14 PM
Finding My previous post rustygun3 Excel Discussion (Misc queries) 1 June 7th 07 10:25 AM
To Mr. Liengme: Re My previous Post Concerning My Bar Chart Problem Robert11 Charts and Charting in Excel 1 March 23rd 06 03:14 PM
Previous Post - Correct Syntax Query Clarence Crow Excel Worksheet Functions 0 December 7th 04 06:35 AM


All times are GMT +1. The time now is 06:47 AM.

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"