LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default vba, how to go to Col B in whatever row is active

Hi,

I'm new to VBA but didn't find the help I need online. I'd like some simple code to enable a client to add a new row to a budget cost center. There may be 20 cost centers, each with 4 rows for entering budget information in the budget form I give them. But some cost centers will need more detailed descriptions, thus another row or two may need to be added by the client.

I would like for them to be able to click once in any of the 4 rows (to make it the active cell) in a given cost center (the fifth row is a summary row), then either click a button or a execute key combination to add a new row within that cost center.

1. So the first thing the code needs to do is go to Column B while staying in the current row. I don't know how to do the code for this.

In Column B every cell has a Cost Center number. B5:B10 might be 64400; B11:B15 might be 63300.

2. So after the code arrives in Col B, I'd like it to move down until it finds the first cell which is not equal to the cell above it. That is where I'll insert the new row, keeping it within the same cost center rows.

If anyone can help with some code to do these two steps, I'd really appreciate it!

Thank you,
Harold

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Row select mode to highlight active row of active cell Bart Fay[_2_] Excel Discussion (Misc queries) 0 May 11th 10 09:34 PM
run macro although blinking cursor is active in an active cell bartman1980 Excel Programming 1 December 20th 07 11:29 AM
I need to sort an active sheet using the col of the active cell HamFlyer Excel Programming 3 June 6th 06 07:25 PM
how can I return the active row and active column? Greg Excel Programming 0 February 3rd 05 07:38 PM
HOW TO COPY 480 ACTIVE E-MAIL ADDRESSES CLM "G" ON AN ACTIVE EXCE. ragman10 Excel Discussion (Misc queries) 1 December 13th 04 11:52 PM


All times are GMT +1. The time now is 07:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"