Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
It's always difficult to convey thoughts via text. I'll see if I can
pair down the spreadsheet and send it to you. That is a very kind offer. In the meantime, some answers below : On Dec 20, 2:53 pm, "Sandy Mann" wrote: Sorry Brady but I can't follow exactly what it is you are trying to do and there seem to be inconsistencies in what you are saying. For example you say: I use RowNum in a for/next loop that starts at 1If RowNum starts at 1 and (sans the "-SubTotal") is the row above it. Thus, RowNumMin is defined as RowNum -1.Then RowNumMin must start off at zero so your code line: Or Cells(RowNumMin, ColPN).Value = "not inventory" Thenshould throw an error because there is no Row zero. Unless you are finding RowNumMin in a different counting loop. First, RowNum and RowNumMin are in the same counting loop. Thus, if RowNum was 1 then indeed, RowNumMin WOULD throw an error...BUT ONLY, if the code using RowNumMin were not wrapped in the If statement below: For i = 1 to "the end" If (somecell identified by i).hasformula Then (some code) using (somecell identified by i) using RowNum and RowNumMin endif Next i Remember, I am only looking to perform an operation on rows that have a "formula" (the subtotal formula) in the qty column. Thus, since the top row (row 1) is never a formula...I never get an error for RowNumMin being "0". I should probably change the i value to start at 2 but...I'll get to that later. Does it make more sense to you now? Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Automatic Update of Dropdown List Box data | Excel Worksheet Functions | |||
Text formatting | Excel Worksheet Functions | |||
Find the cell value in excel by using vb code | Excel Discussion (Misc queries) | |||
Possible Lookup Table | Excel Worksheet Functions | |||
GET.CELL | Excel Worksheet Functions |