Sunday, May 27, 2012   
  Search   
 

Office 2010 - Launch Event

Register  Login  
Forums  
     Minimize  

MeraWindows Forums - Get your Computer Problems Fixed

This is a site run by the community - for the community. At the site, we share and contribute our computer learnings with each other. We discuss about Windows, Office, Mobile, Gaming and other computer related topics. At our forums you can post your queries and our very helpful community members will respond quickly to your queries. We organize lots of competitions from time to time and award prizes to the winners.
You will need to register at the site before posting in forums. It's absolutely free. After registering, you can get all the benefits available to our registered members, you can access our Downloads section, you can participate in contests, etc. You can post in forums in English as well as in Hindi, in fact we encourage you to use Hindi in your posts. If you have any problem with registration or login, please contact us.

     
  
HomeHomeMicrosoft Offic...Microsoft Offic...Microsoft ExcelMicrosoft ExcelDelete Blank Cells but Hold Values for Calculations Delete Blank Cells but Hold Values for Calculations
Previous
 
Next
New Post
7/6/2010 4:35 AM
 

Hi all,

I have 50 000+ lines of data, and thus, would like to learn of an easier solution to what I have been doing in the past week or so. In short, I need a formula(s) or VBA macro that removes the whole row of data if there is a blank in one of the cells; however, I need Excel to "remember" or hold the value that it deletes and use this on a simple calculation for the remaining cells which were not deleted.

In column B = dates of the event, column D = string (with some cells being blank), column E = integer values. (Columns A and C are irrelevant to what I need to do). I would like Excel to find the blank cells in column D, hold the numerical value (column E), delete the whole row and redistribute the held value to the remaining cells corresponding to a particular date.

For example,

........A ................B...............................C .....................D........... .......E
1 ..Description ......Date ........Description_2....... Code.............Value
2 .....Taxi.......... 31/07/2006.... Work.................. ..ALZ..............0.00765
3 .....Taxi ..........31/07/2006 ....Work .................CRTXXL .........0.63400
4 .....Taxi ..........31/07/2006 ....Hometime ........WOT3 ...........0.645483
5..... Taxi.......... 31/07/2006 .....Work .......................................0.210
6 .....Taxi ..........30/04/2008 .....Hometime .......PTYR ...........0.765

....etc etc.... for 50 000+ lines.

I want Excel to identify that there is a blank in cell D5, delete the whole of row 5 but hold the value 0.210 in its memory, divide 0.210 by the remaining number of cells corresponding to that particular date (ie. 0.210/3) and add this amount (0.07) to each the values in cells E2, E3, E4.... and repeat for all the remaining blanks.

I would also like Excel to output in a new worksheet all the rows that it has deleted (ie. all the information in row 5 in the above example), so that I can double-check it.

I hope Excel is able to do this...as I have been manually calculating this over the past week or so.


Thank you in advance for any help and assistance.

 
New Post
7/6/2010 8:18 AM
 

Hi,

Please upload the workbook on some free file hosting server and post the file link as a reply to this. I would like to try my solution on live data (with actual number of rows and columns


For Microsoft Excel trainings in India, please visit http://www.ashishmathur.com/corporate-interventions/

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
Website
Blog
 
New Post
7/6/2010 8:58 AM
 

Hi Ashish,

I have uploaded one of the workbooks for you here ---> http://www.mediafire.com/?j2yodj1njzt

The blank cells are in column D and the value I need Excel to hold is in column E of the same row if the cell in column D is blank.

Thanks so much again!

 
New Post
7/6/2010 5:47 PM
 
Hi,

You may refer to my solution at the following link (Question 20) - http://ashishmathur.com/knowledgebaseII.aspx

Hope this helps.  Do let me know how this works.

For Microsoft Excel trainings in India, please visit http://www.ashishmathur.com/corporate-interventions/

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
Website
Blog
 
Previous
 
Next
HomeHomeMicrosoft Offic...Microsoft Offic...Microsoft ExcelMicrosoft ExcelDelete Blank Cells but Hold Values for Calculations Delete Blank Cells but Hold Values for Calculations


   User Log In Minimize  


Register
Forgot Password ?

     
  
   Follow Us Minimize  
     
  
     Minimize