excel - VBA Nested If Multiple docs -


okay feel i'm close in coding i'm not quite there.

what want have excel @ workbook in column b.offset(0, 3) , each value = "rf" want check if value in workbook b in column b.offset(0, 3) = "rf" . if workbook b value not "rf" want have value in workbook column b of each instance pasted workbook c in same destination (ex: b4 b4)

if workbook b value "rf" want excel @ value in column b.offset(0, 11) workbook , b. each instance workbook column b.offset(0, 11) > workbook b column b.offset(0, 11) want post value of workbook column b same destination. (i didn't start second part code messing below code)

please let me know if need more info , help. (took code out cause wasn't posting hope works)

i'm having little trouble understanding organization of data. in excel terms, workbook collection of worksheets , exists excel file. assuming using 3 excel files. use of offset isn't matching syntax of offset(range, row, col). performing set of evaluations on each row of data - using workbook a, column b master?
here's algorithm understand it:

for each row in workbooka.colb(offset 3)      if workbooka.colb(offset 3).value = "rf"        if workbookb.colb(offset 3).value <> "rf"            workbookc.colb(offset 3).value = workbooka.colb(offset 3).value        else            avar = workbooka.colb(offset 11).value            bvar = workbookb.colb(offset 11).value            if avar > bvar                workbookc.colb(offset 11).value = avar            end if        end if     end if next row 

so workbook c has possibility of getting 0-1 columns updated per row. 3 workbooks/files, put code in workbook a. capture row, col3data, , col 11 data workbook user-defined-type array row corresponds array index. structure include acol3data, acol11data, bcol3data, bcol11data. once load worksheet data array, open excel object on workbook b, use index of array load bcol3data , bcol11data. close workbook b. open workbook c. start @ top of array , work through algorithm each index value. have easier time using objsheet.cells(i,3).value instead of offset statement. row, 3 column.


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -