Hello,

I am new to Excel VBA.

I am Working on a Monthly Data and my Excel File has one Report Sheet and other source data Sheets containing month wise data. Format of Report and source data sheets is same, just values will be changed depending on the month (using Combo Box selection). My data structure is As Follows:

Month: ____

Category A:

Product Sales
P1 70
P2 50
P3 45
P4 85
Blank Row1
Blank Row2
Blank Row3
Category B:

Product Sales
P5 35
P6 78
P7 74
P8 65

Product and Sales Values will be from source data depending on the month selection (i.e. Dynamic).

Currently I have 3 Months data from April to June sheet wise and No. of Products in these months are not equal say for Category A, April has 6 Products, May has 4 and June has 7.

So in a Report Sheet, I want Dynamic adjustment of Blank Rows between above Two Tables i.e. If I keep 3 rows blank between them than switching to different month by Combo Box will keep 3 Blank rows constant between above Two Tables (by automatically Inserting / Deleting Rows) so that Report looks appropriate.

For Information:
I have used following 'INDIRECT' formula in cells (in Product as well as Sales Column of Report Sheet) to pull data from source Sheet linked with Combo Box (which has Sheet Names).

IF(INDIRECT("'"&$C$3&"'!C7")<>0,INDIRECT("'"&$C$3&"'!C7"),"") {C3 is Cell link of Combo Box and C7 is some cell in source sheet}
'IF' is just to Display Blank (instead of zero) in Report Sheet if no Data is there in source sheet.

Is there any Way to Do this or is there any other way of pulling data which resolves this issue?