Help with formula

J

Josh W

I am trying to create a formula whereby every seventh cell vertically
subtracts 0.75 from the previous amount, for example as follows:
I3=72
I10=71.25
I17=70.5
I24=69.75
I31=69
And so on all the way down. The cells in between are empty.
How do I acheive this? Many thanks!
 
J

Jacob Skaria

1. Enter 72 in I3

2. Enter the below formula in I10
=I3-0.75

3. Select I4:I10. Drag the selection handle down as required....

If this post helps click Yes
 
Y

ytayta555

And so on all the way down. The cells in between are empty.

One way :

Sub EXTRACT75()

Dim FromWbook As Worksheet
Dim myCell As Range
Dim myRng1 As Range

Set FromWbook = Workbooks("YOURWORBOOKNAMEHERE.xls").Worksheets
("YOURWORKSHEETNAMEHERE")

With FromWbook
Set myRng1 = .Range("I14:I100")
End With


For Each myCell In myRng1.Cells

If myCell.Value <> Empty Then
myCell.Value = myCell.Offset(-7, 0).Value - 0.75
End If
Next myCell
End Sub

For each cell in column I which is not empty , will extract
what you wish . You'll have trouble if you don't have first
value in cell I7 and second in cell I14 , but ... that's whai I know .
Hope to help .
 
J

JoeU2004

Jacob Skaria said:
1. Enter 72 in I3
2. Enter the below formula in I10
=I3-0.75
3. Select I4:I10. Drag the selection handle down as required....

Good answer. If dragging the selection down is a drag ;), you can enter the
target range into the Name Box (normally to the right of the Formula Bar in
Excel 2003), e.g. I4:I675, then paste (e.g. press ctrl+v).


----- original message -----
 
J

Josh W

Thanks Jacob, I had huge problems finding my post. Somehow the notification
link received in my email box just opens a blank page in the communities
page, and I also don't know how to find all my posts in one place.

You solution was excellent! Simple and effective. I am embarrassed I
couldn't think of it...
 
J

Josh W

Hi Joe, thanks for the tip. Somehow I couldn't figure it out. Could you give
me a more specific step by step guide? I know, I am real stupid...
Much appreciated.
Josh
 
R

Rick Rothstein

Joe "misspoke" when he said the Name Box is to the "right" of the Formula
Bar... it is locate on the *left* of the Formula Bar. Just type in an
address (for example, B2) or a range (for example, C3:M9) and that cell or
range will be selected.
 
J

JoeU2004

Rick Rothstein said:
Joe "misspoke" when he said the Name Box is to the "right" of the
Formula Bar... it is locate on the *left*

Grumble! I don't why I get left and right mixed up; started a few years
ago. It's a big joke in my family.

Just type in an address (for example, B2) or a range (for example,
C3:M9)

And press Enter.


----- original message -----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top