using cell values as reference points for formulas

Casey

Board Regular
Joined
Feb 18, 2002
Messages
82
Hello,
Ive got a question which Im sure has come up before, but I dont know how exactly to phrase it. Ive got a spreadsheet which has data for 100 samples(I work in a lab) listed vertically down the spreadsheet. Each sample has more than one entry and unfortunatly they dont have the same number of entries. What Im trying to do is. I know there are some spaces in the first column between samples. How would I go about sticking a formula in a cell that is down one row and four to the left of the last space? any suggestions?
Thanks
Casey
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Hi Casey

There is an offset formula, but there might be an easier way. Are you trying to use a formula to list all the samples with the same name (like sorting)?
Can you clarify what you are trying to achieve
regards
Derek
 
Upvote 0
Hi Derek,
Ive got about 100 samples and a certain reading is taken at various temperatures. Then the results are put into a textfile. The temps are then listed from top to bottom for each one of the samples. The only thing is occasionally more readings are taken than the normal (not something I can control) so I cant create a formula for one sample and expand it down to the others. So what I was thinking was to have a formula run in reference to the space between samples.
Thanks
Casey
 
Upvote 0
Hi again Casey

I'm off to bed but I'll leave you with this bit of code which might help. Change the formula details to fit your formula. Note that before you run the macro you have to select the data. If you have a fixed range
eg G4:G150 replace Selection with Range("G4:G150")



For Each cell In Selection
If cell.Value = "" Then
cell.Offset(1, -4).Formula = "=A1+B1"
End If
Next
End Sub


Hope this helps
regards
Derek
 
Upvote 0

Forum statistics

Threads
1,213,534
Messages
6,114,186
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top