Hello,
I was wondering if someone could help me along with coding a logical function in Visual Basic code in a macro. I am a bit new to macro's and VBA in excel.
The reason why I would like to code this function is because I do not want to put the logical functions in all the cells.
My cells in the spreadsheet are only 0,3 .. wide and I would like to put some text in some cells.
The 'false' (i.e. " ") statement in every cell would make it impossible to show text over multiple cells.
I have an idea of what it should do, but I need a kickstart to know what I am looking for on the web. Some basic examples would help a lot!
The file is attached, it is a gant chart spreadsheet.
The idea.
Sub ProAssignProjectnames()
assign cell p to variable
assign cell ps to variable
For (countcolumn) is p to ps do
For (countrow) is 5 to 12 do
// Compare two cells
if $E(countrow) = (countcolumn)$3 do
// If the cells are the same the combination of the 'counters' is the new cell.
// $C(countrow) is the text that needs to be in the new cell.
(countcolumn)(countrow) = $C(countrow)
// If the new cell is found and assigned the right text go to the next row
next row
// If the comparison is false go to the next column
else
next column
Assign new cell (countcolumn)(countrow) in the sheet with the right text $C(countrow).
End sub
Optional extra: Button on the spreadsheet to run the macro.
Hope someone can help me out. 
Thanks, Wiggert.
Bookmarks