View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Matthew Scheperle Matthew Scheperle is offline
external usenet poster
 
Posts: 3
Default Hiding formula/functions

I received a spreadsheet that someone wants me to help them with. The vba
code that runs when a button is clicked exports a range to a csv file. I
entered the following formula into the first column so that it would enter a
1 only when something is entered into column N. This part works.

=IF(N8<"",1,"")

However, when I know export the data it thinks it should export all 92 rows
because it thinks the formula is part of the data. How do I tell the code
to NOT include the formula when it searches for a blank row?

Thanks,

I am thinking there is something simple I can enter to hide formulas from
being seen... part of the code is below and I think it might be something I
could enter here.

If endRow = 8 Then
For rowNdx = 8 To endRow
inputRow = ""
For colNdx = 1 To 24

If Cells(rowNdx, colNdx).Value = "" Then
cellValue = ""

Else
cellValue = Cells(rowNdx, colNdx).Text

End If
inputRow = inputRow & cellValue & ";"
Next colNdx
inputRow = Left(inputRow, Len(inputRow) - 1)
Print #fNum, inputRow
Next rowNdx

Else
GoTo EndMacro:
End If

--
Matt