using cell values as reference points for formulas
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: using cell values as reference points for formulas

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Posts
    82
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    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

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Location
    Perth Australia
    Posts
    1,579
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Posts
    82
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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

  4. #4
    Board Regular
    Join Date
    Feb 2002
    Location
    Perth Australia
    Posts
    1,579
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    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

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com