+ Reply to Thread
Results 1 to 13 of 13

Using if and isblank nested.

  1. #1
    Forum Contributor
    Join Date
    03-25-2011
    Location
    London, England
    MS-Off Ver
    office 2021
    Posts
    318

    Using if and isblank nested.

    Hi Guys

    I have a downloaded situation. I do not know precisely how the files will arrive. There may be an empty 2nd row.
    I want to enter a function to test if the second row is blank and if so enter 0 in column A. and the enter numerical order for the remaining rows which have data in them stopping once the next blank appears. The top row being headings.

    I am trying out various combinations but have not found the answer yet. If someone has the answer would be greatly pleased.

    Mark
    Last edited by markDuffy; 01-29-2013 at 07:47 PM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Using if and isblank nested.

    Mark

    What have you tried?

    Do you need to keep the blank row?
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    03-25-2011
    Location
    London, England
    MS-Off Ver
    office 2021
    Posts
    318

    Re: Using if and isblank nested.

    Quote Originally Posted by Norie View Post
    Mark

    What have you tried?

    Do you need to keep the blank row?
    No i do not need the blank row.
    have tried variations of if and isblank. have since then researched some courses and am looking ad doloop.

    I will pop up a sheet showing what i get and what I want. If effect what I am doing is creating a simplified account system for a friend. I want her to be able to get her bank statements and put them into an excel sheet which then does some operations on them. Then some manual. Then another jump into the main transaction sheet which will give her her VAT,Monthly accounts and end of year accounts. Once thereI will add on a few more bits like individual accounts debtors etc. OK I could buy it but then i would not learn anything. Everything in accounts is very straight forward. Only bit outside is what to allocate this or that to which can change year to year depending upon government and one's personal situation.

    Excuse the xxx which will be in the sample. Don't want to advertise her account etc.

    mark

  4. #4
    Forum Contributor
    Join Date
    03-25-2011
    Location
    London, England
    MS-Off Ver
    office 2021
    Posts
    318

    Re: Using if and isblank nested.

    Hi Norie
    You did ask me to tell you what I am aiming to do. I though that rather than just show you the immediate issue i would give you the whole section so you know what is in my mind. Attached please see a sample. The columns on the left are the original as they come and on the right is what I want to end up with. I am including the original csv file in case you have some thoughts. Ah does not like .csv files . No matter

    Mark
    Attached Files Attached Files

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Using if and isblank nested.

    If you want to delete a row if it's blank it's easy enough.

    However in you example the row isn't blank, there's data in columns I-R

  6. #6
    Forum Contributor
    Join Date
    03-25-2011
    Location
    London, England
    MS-Off Ver
    office 2021
    Posts
    318

    Re: Using if and isblank nested.

    Hi Norie
    I have two scenarios in the same example the first batch of columns are what i receive and the second is what I want to end up with. Hope this makes sense.
    Mark

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Using if and isblank nested.

    Mark

    I'm confused.

    There are only 2 worksheets, one with data and one with a kind of explanation of what you are trying to do.

  8. #8
    Forum Contributor
    Join Date
    03-25-2011
    Location
    London, England
    MS-Off Ver
    office 2021
    Posts
    318

    Re: Using if and isblank nested.

    Sorry Norie but yes that is correct. The explanation is what I am working on. In the sheet with the data I have made two sections. The data on the left is what i have and adjacent to it is the same data with the additional columns etc as described in the explanation. Would it be better if i had three sheets? Can do so immediately if necessary>

    By the way i am trying =match to see how many it can recognize. Results are surprising in that it can recognize some but not others. I do not know precisely how it works.

  9. #9
    Forum Contributor
    Join Date
    03-25-2011
    Location
    London, England
    MS-Off Ver
    office 2021
    Posts
    318

    Re: Using if and isblank nested.

    Here is a new workbook with three work sheets.
    Attached Files Attached Files

  10. #10
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Using if and isblank nested.

    Mark

    That explains things.

    I noticed the 2 sections of data were kind of similar but thought it might have been some sort of transaction type thing.

    Anyway, is the no of columns of data always the same?

    If they are you can check for a blank row using COUNTBLANK.

    In code it would look something like this.
    Please Login or Register  to view this content.
    Last edited by Norie; 01-28-2013 at 05:55 PM.

  11. #11
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Using if and isblank nested.

    Just to make a start

    You can use this one to delete the empty rows, depending on the value in column A

    Please Login or Register  to view this content.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  12. #12
    Forum Contributor
    Join Date
    03-25-2011
    Location
    London, England
    MS-Off Ver
    office 2021
    Posts
    318

    Re: Using if and isblank nested.

    So far with Excel i have stuck to using Functions. I will make a start studying VBA this evening so that I can use this exceptional advice. So you will not hear from me till tomorrow.

    Thanks again and again

  13. #13
    Forum Contributor
    Join Date
    03-25-2011
    Location
    London, England
    MS-Off Ver
    office 2021
    Posts
    318

    Re: Using if and isblank nested.

    Hi Guys

    Thanks for the help i have used the first solution by Norie. Pathetic but it made me so good to see it working that I had to run it again and again. So thanks.

    All the best Mark

+ 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