Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default go to next columb

I have a template on worksheet 1, worksheet 2 is the monthly totals from the
daily. I am trying to get excel to choose the next columb if there is info in
the columb. the formula "IF(ISBLANK(a2),sheet2!b2+b2,XXX). what is the code
for XXX to get the curror to go to the next columb for the same IF statement.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default go to next columb

a formula can't make a cursor move to another column. it can only
work within the cell that the formula is in. you are asking for code,
but what you have written is a formula.

if you want the VBA code for such a scenario, it would be something
like this (although your description is not very specific and i don't
know if it have understood you correctly):

if worksheet("Sheet1").range("a2").value = "" then
worksheet("Sheet1").range("a2").value = "=Sheet1!B2+Sheet2!B2"
else
worksheet("Sheet1").range("a3").select
end if

but that only does it once. you'd have to set a range and then do a
For Each Next loop to go through the range cell by cell.
hope that gets you started.
:)
susan


On Dec 24, 1:30*pm, oderf wrote:
I have a template on worksheet 1, worksheet 2 is the monthly totals from the
daily. I am trying to get excel to choose the next columb if there is info in
the columb. the formula "IF(ISBLANK(a2),sheet2!b2+b2,XXX). what is the code
for XXX to get the curror to go to the next columb for the same IF statement.


Reply
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
Copy and paste to the last Row of columb A tran1728 Excel Discussion (Misc queries) 6 May 6th 10 02:02 AM
columb width/height ohtml New Users to Excel 3 January 26th 10 05:43 PM
how do i make subcolumbs with in a columb with 2003 excell jsm New Users to Excel 1 January 12th 08 07:21 PM
EXCELL I WANT TO LOOK UP AN ITEM AND FILL IN MORE THAN 1 COLUMB GAR Excel Programming 1 May 20th 06 01:34 AM
excel/some text auto repeats in same columb others don't why. P.G.C. Excel Worksheet Functions 1 October 20th 05 06:17 PM


All times are GMT +1. The time now is 09:48 PM.

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

About Us

"It's about Microsoft Excel"