Fill All Rows Across All Columns In Step

• I have 4 columns. I want to add 100 to all rows in the first column, 150 to the ones in the second, etc. Is this possible? I have Excel 2007.

• Re: Adding Value To Multiple Rows?

Code
``````Dim Cell as Range
with sheets("Sheet1")
for each cell in.Range("A1:" & .Range("A65536").end(xlup)
cell.value="100"
next``````

repeat changing column letter....not tested, if you have values in the cells already and want to keep them then change

Code
``Cell.value=100[code] for``

Cell.value=cell.value & " 100"[/CODE]

• Re: Adding Value To Multiple Rows?

Pardon my ignorance, but how do I go about putting that code into use?

• Re: Adding Value To Multiple Rows?

To flesh out Stephen's suggestion, in a blank row enter the numbers to be added to each column: 100, 150, ...

Copy those cells, select the data in those same columns, and do Edit > Paste Special, Add.

[SIZE=1]Entia non sunt multiplicanda sine necessitate.[/SIZE]

• Re: Adding Value To Multiple Rows?

Quote from shg

To flesh out Stephen's suggestion, in a blank row enter the numbers to be added to each column: 100, 150, ...

Copy those cells, select the data in those same columns, and do Edit > Paste Special, Add.

Got it, thanks!!!

• Re: Adding Value To Multiple Rows?

Quote

I want to add 100 to all rows in the first column, 150 to the ones in the second, etc. Is this possible? I have Excel 2007.

"all" rows? Possible, yes, practical, a BIG NO.

• Re: Fill All Rows Across All Columns In Step

Dave i assumed he meant all used rows, otherwise he's in for a big problem!

• Re: Fill All Rows Across All Columns In Step

Quote

Dave i assumed he meant all used rows, otherwise he's in for a big problem!

IF that is the case, Select Column A and use Edit>Replace to replace * with 150. Select all numbers in Column A starting. Right click on the Fill Handle in the number row of Column A and drag across, release and choose Series from the pop-up menu and make use of the Step/Stop Value.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!