Tricky Hide/Cut+Paste Loop Job..Any suggestions appreciated!

cdhoughton

Board Regular
Joined
Dec 5, 2003
Messages
170
I have basically two sections on a single worksheet.

The top half is essentially an accounting note which is comprised of a maximum of 5 columns (E-I) with a total column in K.

The bottom half starts at row 39 and the data range of interest is E39:F58 (named BSNotes). This has been split into two separate ranges E39:E58 (BSNotes03) and F39:F58 (BSNotes02).

The top half is conditional, and for presentational purposes I would like to hide certain parts of the note should there be no data to display (this is represented on the sheet by a 0 value).

What I need to do is a kind of loop test:

If the first column of the top note contains all zero data, move the range BSNotes 1 column across.

If the second column of the top note contains all zero data AND the first column contains all zero data, move the range across 2 columns. However, if the second column contains zero data and the first column does not, then move BSNotes02 only....

I hope I'm making myself clear, it's **** confusing!

The basic gist is to keep moving the data along so that it does not lie in the column with zero data, as I will then write a procedure to hide that column.

Any ideas how to approach this? I've tried drafting an if statement flow chart but it's getting a bit complicated and if I can avoid this I would!!!

Cheers in advance for any suggestions!!
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,203,436
Messages
6,055,372
Members
444,781
Latest member
rishivar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top