PC Review


Reply
Thread Tools Rate Thread

Conditional Selection VBA code

 
 
Himansu
Guest
Posts: n/a
 
      4th Mar 2008
Hello everyone,

Anyone know vba (excel) that will let me:

1. go to the last cell in the worksheet
2. select that cell
3. delete everything in the cell
4. then select that cell and everything else if A9 is blank
5. delete the selection
6. SUBTOTAL the last row

--
This might seem a little confusing, but let me know if I need to be more
specific.

** Any help will be greatly appreciated.

Have a good day.
--
Himansu


 
Reply With Quote
 
 
 
 
Jason Lepack
Guest
Posts: n/a
 
      4th Mar 2008
Himansu,

See comments inline.

> 1. go to the last cell in the worksheet

Define the "last cell in the worksheet"

> 2. select that cell
> 3. delete everything in the cell

This is fine

> 4. then select that cell and everything else if A9 is blank

Define "everything else"

> 5. delete the selection
> 6. SUBTOTAL the last row

Why do you want a subtotal on only one row?

Cheers,
Jason Lepack
 
Reply With Quote
 
Himansu
Guest
Posts: n/a
 
      4th Mar 2008
Jason,

1. Last cell = ctrl + g | Special | select "Last cell"

4. "everything else" means:

If any cell after a9 is blank then go to that cell and select it while
selecting the last cell. This will give me a range.

5. Delete that range and subtotal what I select.

** Do you want me to provide you a template or screen shoot?

--
Himansu


"Jason Lepack" <(E-Mail Removed)> wrote in message
news:3ad8ae94-8682-4b28-b3a8-(E-Mail Removed)...
> Himansu,
>
> See comments inline.
>
> > 1. go to the last cell in the worksheet

> Define the "last cell in the worksheet"
>
> > 2. select that cell
> > 3. delete everything in the cell

> This is fine
>
> > 4. then select that cell and everything else if A9 is blank

> Define "everything else"
>
> > 5. delete the selection
> > 6. SUBTOTAL the last row

> Why do you want a subtotal on only one row?
>
> Cheers,
> Jason Lepack



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional row selection Vee Microsoft Excel Programming 5 2nd Sep 2008 08:36 PM
Selection.Cut Selection.Offset(1, 0) HOW to understand this code CAPTGNVR Microsoft Excel Programming 4 22nd Apr 2008 12:25 AM
Conditional Selection matthew.clegg@macquarie.com Microsoft Excel Worksheet Functions 1 5th Jun 2007 03:00 AM
Conditional Sheet Selection lobster Microsoft Excel Misc 2 15th Mar 2004 01:36 PM
conditional selection of fields from a selection of a recordset sreenivas s Microsoft Access Queries 0 3rd Aug 2003 01:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:59 PM.