LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Cell Reference

I'm looking for tips on how to reference the first or second cell in a row.

Specifically a calculation in J3:J1000 references a number value in J1 and K1 as well as a date value in J2 and K2 (=J2 and < K2). Likewise a calculation in K3:K1000 references a number value in K1 and L1 as well as a date value in K2 and L2. Also there is a reference to a date in E3:E1000 and a calculation done with a value in I3:I1000.

I have this setup as formulas which work fine but am trying to rewrite in VBA. I am not looking for the whole formula to be written in VBA, just some help in how to reference a specific cell in a column.

The formula I'm using now is:

=IF(AND(DATE(YEAR($Q5),MONTH($Q5)+($J5+(ROUNDDOWN( ABS(R$1/$J5),0)*$J5)),DAY($Q5))=R$2,DATE(YEAR($Q5),MONTH( $Q5)+($J5+(ROUNDDOWN(ABS(R$1/$J5),0)*$J5)),DAY($Q5))<S$2),DATE(YEAR($Q5),MONTH( $Q5)+($J5+(ROUNDDOWN(ABS(R$1/$J5),0)*$J5)),DAY($Q5)),"")

The bold areas are where I am trying ot reference the first or second rows.

Thanks,

Brian
 
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
Changing sheet reference to cell reference TeeJay Excel Worksheet Functions 3 October 19th 07 11:50 AM
Formulas that reference cells that reference another cell Andrea Excel Discussion (Misc queries) 7 October 19th 06 08:14 AM
absolute cell reference A spreadsheet cell reference that does no help Excel Discussion (Misc queries) 1 January 18th 06 06:56 PM
problem with cell reference in =sum(offset(cell reference,x,y,z,a)). Want cell ref to be variable. [email protected] Excel Worksheet Functions 2 December 11th 04 12:05 AM
Problem with =sum(offset(cell reference,w,x,y,z). I want cell reference to be variable [email protected] Excel Worksheet Functions 2 December 11th 04 12:00 AM


All times are GMT +1. The time now is 06:57 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"