+ Reply to Thread
Results 1 to 7 of 7

reading until blank cell occurs

  1. #1
    Registered User
    Join Date
    01-12-2009
    Location
    texas
    MS-Off Ver
    Excel 2003
    Posts
    6

    reading until blank cell occurs

    How would i get this logic into a marco or formula?

    if 'sheet1' a1 > 0 then a1 = 'sheet1' a1
    then auto fill until sheet1 a* = 0
    so it might look like

    a1 = 'sheet1'a1
    a2 = 'sheet1'a2
    a3 = 'sheet1'a3
    etc...
    until 'sheet1' a* = 0

    then when 'sheet1'a* = 0 a* = 'sheet2' a1
    and then auto fill until sheet2 a* = 0
    so it might look like:

    a70 = 'sheet2'a1
    a71 = 'sheet2'a2
    a72= 'sheet2'a3
    etc...
    until 'sheet2' a* =0

    the issue i am having is that i cant get the autofill to populate sheet2 at a1, it starts at maybe a76 or where ever the autofill from sheet1 stops.

    so it looks like
    a70='sheet2'a70
    a72='sheet2"a71
    a73='sheet3"a73
    etc...
    which are empty

    so i would need excel to read all of sheet1 and then start at the top of sheet2 and populate that on a different sheet sheet3

    thanks

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: reading until blank cell occurs

    See if this does what you want:
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: reading until blank cell occurs

    Please Login or Register  to view this content.
    StephenR's code, slight change to pull from sheet 1 and sheet 2, to sheet 3. I think that's what you were going for.
    =IF(AND(OR(BLONDE,BRUNETTE,REDHEAD),OR(MY PLACE,HER PLACE),ME),BOW-CHICKA-BOW-WOW,ANOTHER NIGHT ON THE INTERNET)

  4. #4
    Registered User
    Join Date
    01-12-2009
    Location
    texas
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: reading until blank cell occurs

    thanks, that perfect.
    but how would i edit the info, meaning, if in sheet 3 instead of printing out in a1 i wanted b4 or instead of reading from sheet 1 a1 it would be sheet1 c3?

  5. #5
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: reading until blank cell occurs

    Please Login or Register  to view this content.
    Hope this helps, StephenR's using cells(1, 1) format instead of range("a1") format. The first number is the row reference, so cells(2, 1) would be row 2, column A, and so on, cells(5, 6) would be row 5, column F. I believe the following adaptation will fit your requests, although I haven't tested it ><

    Please Login or Register  to view this content.
    You could just change the constant at the beginning of the declarations, S = 4, R = 3. But I figured for the sake of explanation I'd do it in the formula so you can see what does what.

  6. #6
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: reading until blank cell occurs

    Thank you mewingkitty for picking that up.

  7. #7
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: reading until blank cell occurs

    mew!

    damnit.

    I can't submit a message that consists solely of "mew!"

    I shall have to mew more.

    mew mew mew mew mew mew mew mew mew!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1