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: 27,285
Default Conditional column selection

set rng = Range("B2").End(xltoRight).offset(0,-1)
if rng.HasFormula then
set rng = rng.offset(0,1)
End if

General approach - adjust to your specific situation.

--
Regards,
Tom Ogilvy


"AG" wrote in message
...
I have a monthly spreadsheet setup such that columns A & B are text,

column C is January, column D is February, column E is March, BUT column F
are quarterly totals formulas and so on ending at column S which are year to
date totals formulas. Entries begin in row 2.

On occasion I need to overwrite the monthly entries.


If I want to overwrite the 2nd or 3rd month of a quarter, no problem, I

would use the End Method.

I'd select cell A2 and use the End Method
Range ("B2") .End(xlTo Right) .Select
And select the previous column.

I run into a problem when I want to overwrite the 1st month of a quarter's

entries as the End Method less 1 column to the left puts me in a quarterly
totals column.

How do I prevent overwriting any of the quarterly columns?

Thanks I advance.

Al



 
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
Conditional Formating Based on Selection in a Combo Box adrian007uk Excel Discussion (Misc queries) 4 December 11th 09 08:54 AM
Conditional Selection [email protected] Excel Worksheet Functions 1 June 5th 07 03:00 AM
Formatting (conditional?) a drop down box selection Judithj Excel Discussion (Misc queries) 3 April 9th 07 09:28 PM
Conditional Formatting and selection Kristin N Excel Discussion (Misc queries) 2 September 15th 05 06:27 PM
Conditional selection of two column, csv file Will[_7_] Excel Programming 2 May 19th 04 02:51 PM


All times are GMT +1. The time now is 05:52 PM.

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"