Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default How to code it in excel?

Copy of message from Excel General Question - 9/26/2006 1:22 AM PST

Does anyone know on how to code on following condition in this group?

[row 1] a blank row
[row 2] 10, which should be equal to the last value in row 3
[row 3] 10
[row 4] a blank row

[row 1] a blank row
[row 2] 23, which should be equal to the last value in row 4
[row 3] 23, which should be equal to the last value in row 4
[row 4] 23
[row 5] a blank row
[row 6] 41, which should be equal to the last value in row 9
[row 7] 41, which should be equal to the last value in row 9
[row 8] 41, which should be equal to the last value in row 9
[row 9] 41
[row 10] a blank row

If the next row [10] is a blank one, then current row [9] is defined to be
the last value.

Does anyone know how to code above condition in excel?
Could anyone give me any suggestion please?
Thank you in advance
Eric

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default How to code it in excel?

set cell = cells(rows.count,1).End(xlup)
msgbox cell.Value

--
Regards,
Tom Ogilvy


"Eric" wrote:

Copy of message from Excel General Question - 9/26/2006 1:22 AM PST

Does anyone know on how to code on following condition in this group?

[row 1] a blank row
[row 2] 10, which should be equal to the last value in row 3
[row 3] 10
[row 4] a blank row

[row 1] a blank row
[row 2] 23, which should be equal to the last value in row 4
[row 3] 23, which should be equal to the last value in row 4
[row 4] 23
[row 5] a blank row
[row 6] 41, which should be equal to the last value in row 9
[row 7] 41, which should be equal to the last value in row 9
[row 8] 41, which should be equal to the last value in row 9
[row 9] 41
[row 10] a blank row

If the next row [10] is a blank one, then current row [9] is defined to be
the last value.

Does anyone know how to code above condition in excel?
Could anyone give me any suggestion please?
Thank you in advance
Eric

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 136
Default How to code it in excel?

Hello Eric,

If your numbers are in A1:A99, then write into B1:
=IF(ISBLANK(A1),"",INDEX(A1:A$99,MATCH("Z","Z"&A1: A$99,)-1))
[Enter as array formula with CTRL + SHIFT + ENTER]
and copy down to B99.

HTH,
Bernd

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
Excel code convert to Access code - Concat & eliminate duplicates italia Excel Programming 1 September 12th 06 12:14 AM
do anybody have a sample code for executing excel macro from vb code?<eom B Deepak Excel Programming 2 September 30th 05 09:59 AM
stubborn Excel crash when editing code with code, one solution Brian Murphy Excel Programming 0 February 20th 05 05:56 AM
Excel XP VBA code to search all macro code in Excel module for specific search string criteria Ed[_18_] Excel Programming 4 May 20th 04 02:08 PM
Excel XP VBA code to search all macro code in Excel module for specific search string criteria Frank Kabel Excel Programming 0 May 19th 04 08:11 PM


All times are GMT +1. The time now is 03:49 AM.

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"